Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327962 - ScaledGraphics zoomLineWidth implementation is incorrect and leads to image anomalies
Summary: ScaledGraphics zoomLineWidth implementation is incorrect and leads to image a...
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal with 1 vote (vote)
Target Milestone: 3.6.2 (Helios SR2)   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-15 22:15 EDT by Simon Pope CLA
Modified: 2010-10-18 15:49 EDT (History)
2 users (show)

See Also:


Attachments
Problem showing at 300dpi - lines are too faint (201.71 KB, image/png)
2010-10-18 01:29 EDT, Simon Pope CLA
no flags Details
At 600 dpi, lines are almost invisible (460.29 KB, image/png)
2010-10-18 01:30 EDT, Simon Pope CLA
no flags Details
Correct appearance at 300dpi after code change (196.45 KB, image/png)
2010-10-18 01:31 EDT, Simon Pope CLA
no flags Details
Correct appearance at 600dpi after code change - note that the width of the lines now scales with the resolution of the image (447.93 KB, image/png)
2010-10-18 01:31 EDT, Simon Pope CLA
no flags Details
patch (4.19 KB, patch)
2010-10-18 12:47 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 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.