Bug 387157 - [ImageSupport] Labels are missing on diagrams exported to PNG and JPEG images
Summary: [ImageSupport] Labels are missing on diagrams exported to PNG and JPEG images
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.4   Edit
Hardware: PC Windows 7
: P3 major
Target Milestone: 1.6.2   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard: 1.4.3 Patch
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-13 18:30 EDT by Alex Boyko CLA
Modified: 2013-01-23 14:53 EST (History)
1 user (show)

See Also:
ahunter.eclipse: juno+


Attachments
patch (1.38 KB, patch)
2012-08-13 19:03 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 2012-08-13 18:30:15 EDT
If diagrams are exported to PNG or JPEG, AWT Graphics 2D is used for image generation.
Font support is different for AWT and SWT graphics. If SWT string width is more than 2 pixels different from AWT string, we'd just paint the SWT string on an image and paint that image Graphics 2D to match the string on the screen.
There is a typo in that place checkState() statement is missing that sets the clipping and other parameters for the graphics object. Hence, strings aren't painted sometimes.
Comment 1 Alex Boyko CLA 2012-08-13 19:03:34 EDT
Created attachment 219835 [details]
patch
Comment 2 Anthony Hunter CLA 2012-08-24 12:25:16 EDT
Committed to Juno SR1 1.6.1 and Kepler 1.7.0.

Also checked the change into the R1_4_maintenance branch.
Comment 3 Anthony Hunter CLA 2012-12-07 11:01:48 EST
This actually missed Juno SR1 so will be in SR2.