
Is there a bezierDDA API?
Quote:
> Sorry If I did not make myself clear; I was hoping to avoid the math
stuff!
It's not too difficult to find the code online and convert it to VB - Most
mathematics stays pretty much the same between the two languages.
Quote:
> I dont want to draw the curve myself, I just want the points of the curve
> with a "callback" function, so that after, say, 100 points I would connect
> the two ends with a straight line. The smaller the interval, the better
the
> approximation. The points would be "connected" in a DXF file that I have
to
> create. Something like the Bresenham algorithm but for a bezier curve.
The curve is most likely drawn as a series of line segment each in turn draw
with a Bresenham or similar routine.
Quote:
> I am sure that this API exists. Maybe it is not documented, but if there
is
> an API for the drawing of these curves, then there must be an api that
> enumerates the points.
Have a look at GDI32.dll in the dependency walker, you'll see that the only
*DDA function is LineDDA().
What you can do though is convert the output of the PolyBezier() API to a
path then get the line segments from that. I did some digging and found
this article which you may find useful:
<watch for wrap>
http://msdn.microsoft.com/library/en-us/dngdi/html/msdn_hittest2.asp
</watch for wrap>
Hope this helps,
Mike
-- EDais --
- Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/