neosonic 12 Junior Poster

hi, I have got a polybezier curve which is constructed by 4 points:
(xa,ya), (xb,yb), (xc,yc), (xd,yd).
I draw it in the large picture box.

I want to calculate the length of that curve as close as possible.
and I came across this site:
http://www.angusj.com/delphitips/beziertext.php
which tells me that I need to flat the polybezier curve into a list of points. and calculate the total distance between each points.

in win32gui, we have a flattenpath function to achieve that:
http://docs.activestate.com/activepython/2.5/pywin32/win32gui__FlattenPath_meth.html

win32gui.FlattenPath
FlattenPath(hdc)

Flattens any curves in current path into a series of lines

Do you know how to use this function in vb6?
Or else, do you how to flatten the polybezier curve?
I don't mind to calculate it from the scratch if there is no function who covers it.

thanks a lot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.