Reputation: 259
I need 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:
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
Upvotes: 0
Views: 995
Reputation: 16
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)...
Upvotes: 0