I 开发者_如何学Goneed to determine the X-radius & Y-radius of an ellipse give the major & minor radius and I couldn't find any way how to do it.
I have following inputs:
- Center Point
- Start Point
- Major Radius
- Minor Radius
So, My question is how to create the ellipse rect that should be passed to GDI api i.e. DrawEllipse to draw the ellipse.
Thanks & Regards, Pankaj
Google Bresenham + ellipse (and circle since the algorithm is about the same) or see article http://homepage.smc.edu/kennedy_john/belipse.pdf
Also if you want to have your ellipse in some angle, you might need to draw the ellipse in origo and rotate+translate the point set (e.g. by multiplying the points with suitable matrix)...
精彩评论