Bug 284904 - [ImageSupport] AWT Image line width set to 1 if it is == 0
Summary: [ImageSupport] AWT Image line width set to 1 if it is == 0
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.2   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.2.1   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 13:44 EDT by Alex Boyko CLA
Modified: 2010-07-19 12:29 EDT (History)
1 user (show)

See Also:


Attachments
patch committed for 2.2.1 and 2.3 (1.48 KB, patch)
2009-07-28 13:44 EDT, Alex Boyko CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Boyko CLA 2009-07-28 13:44:51 EDT
Created attachment 142792 [details]
patch committed for 2.2.1 and 2.3

As it follows from draw 2d ShapeStyleExample SWT treats line width = 0 as a special case. If it SWT GC has lineWidth == 0 it draws as if line width == 1. This needs to be synced up with AWT image export, namely GraphicsToGraphics2DAdaptor.
Aside that, the stroke in drawRoundRectangle(...) method is not set, which is a typo.
Attached patch has a trivial fix for this.
Comment 1 Alex Boyko CLA 2009-07-28 13:51:56 EDT
Committed for 2.2.1 and 2.3

Patch also has setStroke(...) call removed from drawPolyline(...), since drawPolyline(...) delegates to drawLine(...) which sets the stroke.
Also committed patch has a comment.
Comment 2 Eclipse Webmaster CLA 2010-07-19 12:29:19 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug