• Drawing rotated and skewed ellipses

Posted by Legacy on 01/04/2004 12:00am

Originally posted by: Chryssa Sferidou

My target is to draw several continuous Bezier curves by clicking with the mouse points on the screen, not by pre-defining the coordinates of the points in the code - How can I achieve this?
Regards

• How to use the code?Any exmaple?

Posted by Legacy on 06/05/2003 12:00am

• http://www.ucancode.net

Posted by Legacy on 03/23/2003 12:00am

Originally posted by: Cindy wang

Very cool article,I like it.

• How to rotate a total 2D drawing drawn in picture box control with a user defined angle

Posted by Legacy on 03/13/2003 12:00am

Originally posted by: Amit Thite

```How to rotate a total 2D drawing drawn in picture box control with a user defined angle

```

• sin() error-- undefined identifier

Posted by Legacy on 12/10/2002 12:00am

Originally posted by: Caroline

while i have included math.h..
why?

• z-axis with win GDI ?

Posted by Legacy on 08/10/2002 12:00am

Originally posted by: Jason

How do you rotate or position a polygon in the z-axis
Im trying to build a small software renderer for 3D
using the GDI, Instead of using OpenGL or Direct3D for rendering. -just for fun :)and I need to learn how you can implement 3D with the GDI

• How to rotate static control,Edit box control

Posted by Legacy on 07/20/2002 12:00am

Originally posted by: Sachin V. Kulkarni

Please any body tell me how to rottate static text box control,Edit box control or bitmap.

• Very Elegant

Posted by Legacy on 05/22/2002 12:00am

Originally posted by: Stan Mlynek

Looks very good and solves a problem with trying to use the windows api ellispe function for W95/98 under extreme conditions

• rotation algorithm shrinks ellipse........fixed

Posted by Legacy on 04/11/2002 12:00am

Originally posted by: lis

the rotation algorithm given is great, but it shrinks the ellipse....if you want a better (and simpler) one convert to polar rotate and convert back again.....here is an example....in VB where atan2 is a special function that will compute the tangent in the correct quadrant....

For i = 0 To 12
'first center the circle we want to rotate around....
x(i) = A(i).x - center.x
y(i) = A(i).y - center.y

'then get the polar coordinates
r = Sqr(x(i) ^ 2 + y(i) ^ 2)
theta = Atan2(y(i), x(i))

theta = theta + angle

'then convert back into cartesian
x(i) = r * Cos(theta)
y(i) = r * Sin(theta)

'then move back to center
x(i) = x(i) + center.x
y(i) = y(i) + center.y

'now set a(i) = x, y
A(i).x = x(i)
A(i).y = y(i)
Next

```how to draw a piechart and biechart using the mfc sdi environment?