Yes, I guess since the sub changes Source and Dest, it does need to be changed back, good catch Steve. I guess I didn't get caught because I never drew anything other than TiltedEllipseFills in my demo.
Steve:
These lines seem odd to me:
I am sure they may seem odd to anyone, who hasn't tried drawing the lines at angles = yuck!
In order to have a pretty filled titled ellipse without overlap nor holes, you have to draw either vertical or horizontal lines or if you are really good, draw non overlapping boxes (which I think Vince attempted at one point).
To do this I used STATIC's formula's to draw the ellipse in an isolated area.
Then I went from top to bottom down the y axis and with the help of POINT found the left and right edge of the ellipse along the flat line. This is why the ellipse had to be drawn in an isolated area, so POINT only finds the ellipse points.
With the edges detected
along flat lines we can draw a clean,no hole, no overlapping Tilted Ellipse Fill, at the place designated at destHandle&.
This is the code block that is finding the left and right edges of the tilted ellipse drawn in the isolated area:
x = 0
x = x + 1
xleft(y) = x
x = x + 1
x = x + 1
IF x
= mx2
THEN xright
(y
) = xleft
(y
) ELSE xright
(y
) = x
You have to find the edges on the same line and you have 3 cases:
1. no edge
2. the left and right edge are the same
3. the left and right edge are different
The added condition
AND x < mx2
keeps x inside the bounds of the isolated drawing area when one or no POINTs are found.
Finally, when you go to draw the actual lines, you must make sure xLeft(y) is not at the right boundry ie no point of the ellipse was found for that y value.