How to draw an ellipse with an rotated angle?

  • Thread starter Thread starter Shalley
  • Start date Start date
S

Shalley

Hello, there,

I have no idea how to draw an ellipse with an rotated
angle. For example, the ellipse's center is (20.0, 50.0),
two conjugate diameter pairs end-point are (35.0, 35.0),
(25.0, 55.0). I hope to use win32 API functions to finish
this drawing. Is it possible?

Please help me giving your suggestion. Tks.
 
Shalley,
In addition to One Handed Man's comment about Graphics.RotateTransform, you
may need to take into account Graphics.ScaleTransform &
Graphics.TranslateTransform (TranslateTransform more so than
ScaleTransform).

RotateTransform will rotate about the current origin, TranslateTransform
moves the current origin.

I find Charles Petzold's book "Programming Microsoft Windows with Microsoft
Visual Basic .NET" from MS Press to be very helpful in unraveling the
subtleties of GDI+.

Just remember order of operations is important while doing transforms in
GDI+.

Hope this helps
Jay
 
Hello,

Jay B. Harlow said:
Just remember order of operations is important while doing
transforms in GDI+.

That depends on the type of the operations.

;-)
 
Herfried,
That depends on the type of the operations.
And if you use the MatrixOrder parameter & which MatrixOrder option. ;-)

Later
Jay
 
Back
Top