开发者

Determine the X-radius & Y-radius of an ellipse

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:

  1. Center Point
  2. Start Point
  3. Major Radius
  4. 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)...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜