views:

22

answers:

2

Microsoft's docs say:

Specifies that the corresponding point in lpPoints is a control point or ending point for a Bèzier curve. PT_BEZIERTO values always occur in sets of three. The point in the path immediately preceding them defines the starting point for the Bèzier curve. The first two PT_BEZIERTO points are the control points, and the third PT_BEZIERTO point is the ending (if hard-coded) point.

http://msdn.microsoft.com/en-us/library/dd144908%28v=VS.85%29.aspx

does this mean it returns cubic or quadratic curves?

Thanks

A: 

It doesn't say either, but depending on how you read it it could be either.

I'm leaning toward cubic rather than quadratic because cubic curves require four points and the documentation says

start anchor

The point in the path immediately preceding ...

two control points

PT_BEZIERTO values always occur in sets of three. The first two are the control points and ...

terminating anchor

the third point is the ending point.

Here's a link describing the differences.

http://www.caffeineowl.com/graphics/2d/vectorial/bezierintro.html

John Weldon
A: 

It's a cubic with shared endpoints. p[0], p[1], p[2], p[3] make up the first segment; p[3], p[4], p[5], and p[6] make up the second segment. And so forth.

Mark Ransom
Perfect thanks! Just one more thing, how would this work if I was using Bezier handles?
Milo
@user146780, the handles are the points in the middle - in my example p[1] and p[2] for the first segment, and p[4] and p[5] for the second segment. I should also add that p[0] will be a PT_MOVETO rather than a PT_BEZIERTO.
Mark Ransom
Alright thanks!
Milo