I have to draw a line between two points using quartz. At some point I have this code:
CGContextBeginPath(ctx);
CGContextMoveToPoint(ctx, lastPoint.x, lastPoint.y);
CGContextAddLineToPoint(ctx, currentPoint.x, currentPoint.y);
CGContextStrokePath(ctx);
This lines will create a hard line between the points currentPoint and lastPoint. The line is so hard, like done by stamping a square of pixels from one point to the other.
Can a bitmap be used (for example a little white blurred ball) to substitute this hard brush tip and create a softness on the line? I mean, create a soft line with blurred edges?
Obviously the little white blurred ball should be stamped along the path to accomplish this. Is that possible? How?
See the next picture. The left line is what the code does currently. The right line is what I would like to do.
thanks