|
-
Oct 7th, 2003, 11:34 AM
#1
Thread Starter
New Member
drawing tilted ellipse
Hello all,
I need to draw an ellipse in a picture box. I am aware of the circle method and also the ellipse win32 API. However, both functions only allow the drawing of a "regular" ellipse (where the bounding box is always an upright rectangle). I need to find something that allows me to draw a "tilted" ellipse.
The information that I am given about each ellipse is the mid-point of each side of the rectangular bounding box, so that the two lines formed by the two pairs of opposite mid-points intersect at the middle of the ellipse. The bounding box might be set at an angle and not align with either the x or y axis.
Any help would be greatly appreciated.
ctse
-
Oct 7th, 2003, 12:32 PM
#2
Addicted Member
hmm thats a tough one, fall back on PSet... Thats my only thought.
NOMAD
-
Oct 8th, 2003, 09:26 PM
#3
Frenzied Member
use setpixel instead, its much faster.
for angle = 0 to 2*pi
newx=cos(angle)*xrad
newx=newx+(newx-x)*slopex
newy=sin(angle)*yrad
newy=newy+(newy-y)*slopey
'setpixel...
next
i havent tested this code, i just made it in my head so im not sure if it works, but it'll maybe help you a bit.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|