Details
-
Type:
Bug
-
Status:
Analysis
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: UDIG 1.1.RC1, UDIG 1.2.M2
-
Fix Version/s: UDIG 1.4.1
-
Component/s: visualization using map layer and style
-
Labels:None
-
Environment:SWT enabled OSes (ie, Not Linux)
Description
SWTGraphics.paint( Shape s) uses GC.drawPath() to render a Feature. If that feature is a line that has a small 'kink' or 'zig-zag' in it the line can be rendered incorrectly. See attached screenshot.
Adding gc.setLineJoin(SWT.JOIN_ROUND) to the draw command fixes this. The problem is that the default style of JOIN_MITER leaves a big long pointy exterior on the outside of the corner where the line turns back on itself.
Here is the patch that I used to correct this issue:
public void draw( Shape s ) {
if( Display.getCurrent() == null )
SWT.error (SWT.ERROR_THREAD_INVALID_ACCESS);
Path path = convertToPath(s, display);
if( path!=null )
}
Images:
1. snapshot21 - what it should look like
2. snapshot22 - what it does look like with line join of miter
3. snapshot23 - the offending piece of data