draw ios quartz 2d path with a varying alpha component
- by Giovanni
Hi, I'd like to paint some Bezier curves with the alpha channel that is changing during the curve painting. Right now I'm able to draw bezier paths, with a fixed alpha channel. What I'd like to do is to draw a single bezier curve that uses a certain value of the alpha channel for the first n points of the path another, alpha value for the subsequent m points and so on.
The code I'm using for drawing bezier path is:
CGContextSetStrokeColorWithColor(context, curva.color.CGColor);
....
CGContextAddCurveToPoint(context, cp1.x, cp1.y, cp2.x, cp2.y, endPoint.x, endPoint.y);
....
CGContextStrokePath(context);
Is there a way to achieve what I'm describing?
Many thanks,
Giovanni