• In answer to my own question at the end there: that "locations" parameter is not a "const float *", it is actually "const CGFloat *" which can be 32 or 64 bits depending on platform architecture, and therefore a C float is not necessarily compatible...so I needed to explicitly use the CGFloat datatype:

    CGFloat_p = ctypes.POINTER(objc_util.CGFloat) CGGradientCreateWithColors = objc_util.c.CGGradientCreateWithColors CGGradientCreateWithColors.restype = c_void_p CGGradientCreateWithColors.argtypes = [c_void_p, c_void_p, CGFloat_p] locations = (objc_util.CGFloat * 2)(0.0,1.0) gradient = CGGradientCreateWithColors(colorSpace, objc_util.ns(colors), ctypes.cast(locations, CGFloat_p))

    and it works fine. As always, thanks all!

  • you have to thin out your points... one way would be to filter data in touch_moved to only register motions larger than X pixels, or that occur after a long delay. then you would use a bezier arc to connect.

    you have to compute the control points yourself, which may be non trivial.

  • You are right, the problem was, that I drew each little line as a path individually. Now that I create one big path and draw it once, it works. Thanks!

Internal error.

Oops! Looks like something went wrong!