Prevent Ellipse From Wrapping

Apr 8, 2010 at 2:53 AM

I noticed when I draw an ellipse like so:

 

Viewport.WriteableBitmap.DrawEllipse(-50, 50, 50, 100, Colors.Red);

The portion of the ellipse that is < 0 wraps around to the other side of the image.

Is there any way to prevent this behavior and just cut off the image?

I'm attempting to use the writeable bitmap for a debug view of my physics objects.  Wrapping is not a desired behavior for me.

-Jeff Weber

 

Coordinator
Apr 8, 2010 at 8:20 AM
Edited Apr 8, 2010 at 8:21 AM

Hi Jeff,

this behavior is not intended. The standard is cliping at the boundaries. I will look into this tonight and change it.

I created a ticket for this issue. Thanks for reporting!

Apr 8, 2010 at 10:32 AM

Excellent. Thanks.

Coordinator
Apr 8, 2010 at 9:14 PM

Fixed it. :) See r45526

Thanks again for reporting.

Apr 9, 2010 at 1:37 PM

Works great.

Just one minor thing I noticed.  When my physics bodies go off the screen, there is still a line, 1px wide, on the edge of the bitmap.  This line will also move  up/down or left/right with the circle I'm "drawing" off screen. 

Not a big deal, I can live with it, but thought you might want to know.

Great project by the way.

-Jeff Weber
www.farseergames.com

Coordinator
Apr 9, 2010 at 3:33 PM

Thanks Jeff.

Annoying issue that I missed in my test app because I used a black rectangle around the bitmap viewport to see the borders. :D

Finally fixed it in r45610. Sorry for the inconvenience.