Status: Accepted

Comment #5 on issue 188 by atdi...@gmail.com: wrong line width when drawing general shapes under SWT

First thing to note is that this issue (pre-fix) only manifest itself for on Windows (not Mac OSX or Ubuntu).

Second note is that adding 0.5 does not seem to be necessary. Just setting the line width is sufficient:

    public void drawPath(final Path p) {
        gc.setLineWidth((int) lineWidth); // no need to + 0.5 here

According to SWT's Javadoc for setLineWidth():

"Note that line width of zero is used as a hint to indicate that the fastest possible line drawing algorithms should be used. This means that the output may be different from line width one."

I believe we are getting this effective behavior by not setting lineWidth, and the correct fix is to set the line width, without adding the 0.5.

Moving out of Fixed state.

Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en

Reply via email to