Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Drawing shapes
Drawing shapes [message #649068] Mon, 17 January 2011 13:48
Greg Brown is currently offline Greg BrownFriend
Messages: 16
Registered: December 2010
Junior Member
Last question (for now). Smile 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,

Previous Topic:Progress Bar Popup
Next Topic:SWT blocking AWT?
Goto Forum:

Current Time: Mon Jan 25 23:47:16 GMT 2021

Powered by FUDForum. Page generated in 0.01537 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top