elez
elez

Reputation: 55

Quadratic Bézier Curve in ipad applications

I want to know about the coordinates of the Quadratic Bézier Curve.

CGContextMoveToPoint(context4, 10, 200);

CGContextAddQuadCurveToPoint(context4, 150, 10, 500, 200);

What are the coordinates used here. Please help me? Can you please explain it?

Upvotes: 0

Views: 181

Answers (2)

Vineesh TP
Vineesh TP

Reputation: 7973

CGContextMoveToPoint(context4, 10, 200);

These are x,y the starting points.

CGContextAddQuadCurveToPoint(context4, 150, 10, 500, 200);

the values are (x1,y1) and (x2,y2) two tangents, P1 and P2

Upvotes: 0

MBo
MBo

Reputation: 80287

MoveToPoint sets current position. It is used later as start point P0, as denoted here, AddQuadCurveToPoint sets control point P1 and end point P2

Upvotes: 2

Related Questions