Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327962

Summary: ScaledGraphics zoomLineWidth implementation is incorrect and leads to image anomalies
Product: [Tools] GEF Reporter: Simon Pope <skjpope>
Component: GEF-Legacy Draw2dAssignee: Alex Boyko <aboyko>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse, hudsonr
Version: unspecified   
Target Milestone: 3.6.2 (Helios SR2)   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Problem showing at 300dpi - lines are too faint
none
At 600 dpi, lines are almost invisible
none
Correct appearance at 300dpi after code change
none
Correct appearance at 600dpi after code change - note that the width of the lines now scales with the resolution of the image
none
patch none

Description Simon Pope CLA 2010-10-15 22:15:33 EDT
Build Identifier: 20100917-0705

The ScaledGraphics class does not scale line widths, leading to bizarre output when the figure is rendered as high-resolution bitmaps (hint, the lines disappear from the printed page!)

The method currently reads:

float zoomLineWidth(float w) {
	return w;
}

It should read:

float zoomLineWidth(float w) {
	return (float) zoom * w;
}

Reproducible: Always
Comment 1 Simon Pope CLA 2010-10-18 01:29:58 EDT
Created attachment 181060 [details]
Problem showing at 300dpi - lines are too faint
Comment 2 Simon Pope CLA 2010-10-18 01:30:40 EDT
Created attachment 181061 [details]
At 600 dpi, lines are almost invisible
Comment 3 Simon Pope CLA 2010-10-18 01:31:10 EDT
Created attachment 181062 [details]
Correct appearance at 300dpi after code change
Comment 4 Simon Pope CLA 2010-10-18 01:31:57 EDT
Created attachment 181063 [details]
Correct appearance at 600dpi after code change - note that the width of the lines now scales with the resolution of the image
Comment 5 Alex Boyko CLA 2010-10-18 12:47:20 EDT
Created attachment 181112 [details]
patch

The patch for zoomLineWidth(float) method
Comment 6 Alex Boyko CLA 2010-10-18 12:55:36 EDT
Delivered the fix in R3_6_maintenance and HEAD. Trivial fix - suggested and tested by Simon.