This article was contributed by Llew S. Goodstadt . Introduction Rectangles, Rounded Rectangles and Ellipses in Windows can only be drawn by GDI as axis-aligned figures. For a cross-platform solution, one needs to do more of the work oneself. Rectangles can be simulated trivially using polygons with four vertices, which can then be rotated or skewed.
Alternatives Use a custom function to draw the ellipse.
The mathematics for ellipses are relatively simple and there are modified Bresenham equations for rotated ellipses in standard texts. However, this means that one must perform the rasterization oneself, which can get complicated for thick lines. Drawing ellipses as connected line segments. Use cubic bezier curves to approximate ellipses. This is the method illustrated here.