Drawing shapes [message #649068] |
Mon, 17 January 2011 13:48 |
Greg Brown Messages: 16 Registered: December 2010 |
Junior Member |
|
|
Last question (for now). In Java2D, a stroke lies half outside of the bounding shape, half inside. For example, let's say I want to draw a 100x50 rectangle at 0, 0 with a stroke width of 1. In Java2D, the stroked shape will actually be drawn at -0.5, -0.5 and will extend to 100.5 and 50.5. If I want the stroke to lie within the bounds of the rectangle, I can draw it at 0.5, 0.5 with a width and height of 99 and 49.
How is this handled in SWT? Since SWT GC coordinates are specified in integers, I imagine that strokes can't fall on non-integral pixel boundaries. How does SWT define the bounds of the stroked shape?
Thanks again,
Greg
|
|
|
Powered by
FUDForum. Page generated in 0.02557 seconds