https://developer.apple.com/documentati ... rvetopoint
- (void)addQuadCurveToPoint:(CGPoint)endPoint
controlPoint:(CGPoint)controlPoint;
https://developer.apple.com/documentati ... rvetopoint
- (void)addCurveToPoint:(CGPoint)endPoint
controlPoint1:(CGPoint)controlPoint1
controlPoint2:(CGPoint)controlPoint2;
Is it me, or is a 'quadratic Bézier curve' missing in the PB vector library?
vector quadratic curve
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Re: vector quadratic curve
Convert it to 'standard' bezier curves which are available in the vector library.
Re: vector quadratic curve
Distilled and converted from your link and for future reference/help:
Seems to do the trick. Still weird it's not there out-of-the-box.
<edit some bad typo's>
Code: Select all
Procedure AddPathCurveQuad(cpx.d, cpy.d, x.d, y.d, Flags = #PB_Path_Default)
Define cx.d, cy.d
If Flags = #PB_Path_Default
cx = PathCursorX()
cy = PathCursorY()
EndIf
AddPathCurve(cx + (2.0 / 3.0) * (cpx - cx),
cy + (2.0 / 3.0) * (cpy - cy),
x + (2.0 / 3.0) * (cpx - x),
y + (2.0 / 3.0) * (cpy - y),
x, y, Flags)
EndProcedure
<edit some bad typo's>