Bug 282591 - [ImageSupport] AWT diagram images don't display standard line style
Summary: [ImageSupport] AWT diagram images don't display standard line style
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.2   Edit
Hardware: All All
: P3 normal
Target Milestone: 2.2.1   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 282589
Blocks:
  Show dependency tree
 
Reported: 2009-07-06 19:23 EDT by Alex Boyko CLA
Modified: 2009-07-27 16:40 EDT (History)
2 users (show)

See Also:


Attachments
proposed patch (10.68 KB, patch)
2009-07-06 19:23 EDT, Alex Boyko CLA
no flags Details | Diff
proposed patch (11.37 KB, patch)
2009-07-08 00:16 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-06 19:23:00 EDT
Created attachment 140914 [details]
proposed patch

To fix:
1) Line styles for AWT diagram image should be look the same as on SWT Image
2) SWT Image should have anti-alias on.

Create a geoshape diagram with a line between two shapes. Change the line style to dotted line.
Export diagram to SWT Image - BMP, GIF, JPG
Export diagram to AWT Image - JPEG, PNG, SVG, PDF

The line on all image shows up different from the original line on the diagram.

Marc, can you please code review this fix for me?
Comment 1 Alex Boyko CLA 2009-07-08 00:16:01 EDT
Created attachment 141037 [details]
proposed patch

Corrected the patch
Comment 2 Marc Gobeil CLA 2009-07-08 16:44:31 EDT
Looks good to me, fixes the problem, renders the dashes, checked with a couple of different line widths.

Just out of curiosity, what's the reason behind swapping ScaledGraphics for RenderedScaledGraphics in DiagramImageGenerator?
Comment 3 Anthony Hunter CLA 2009-07-08 17:16:20 EDT
A reminder that since this depends on a GEF change, we need to get GMF to adopt a new GEF maintenance build first.

so do not commit this just yet.....
Comment 4 Alex Boyko CLA 2009-07-08 17:24:52 EDT
:-( Anthony, I forgot about that... I'll undo the commit.

RenderedScaledGraphics is for keeping the quality of SVG images. This is more of a bug 234708 fix. It shouldn't breaj anything though.
Comment 5 Anthony Hunter CLA 2009-07-27 10:12:33 EDT
(In reply to comment #3)
> A reminder that since this depends on a GEF change, we need to get GMF to adopt
> a new GEF maintenance build first.
> 
> so do not commit this just yet.....
> 

We have created GEF 3.5.1 build M200907241422 and GEF 3.6.0 build I200907241517.

When we commit the fix, we need to update the manifest to require these versions of GEF.
Comment 6 Alex Boyko CLA 2009-07-27 16:40:25 EDT
Committed the fix for 2.2.1 and 2.3
Comment 7 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug