Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329873 - setLineDash(float[]) in ScaledGraphics
Summary: setLineDash(float[]) in ScaledGraphics
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: 3.6.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7.1 (Indigo) M4   Edit
Assignee: Alexander Nyßen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-10 04:37 EST by Romain Raugi CLA
Modified: 2011-05-17 21:54 EDT (History)
2 users (show)

See Also:


Attachments
The proposed patch. (765 bytes, patch)
2010-11-10 04:43 EST, Romain Raugi CLA
wayne.beaton: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Romain Raugi CLA 2010-11-10 04:37:30 EST
Build Identifier: M20100909-0800

org.eclipse.draw2d.Graphics provides two methods for creating custom line styles: setLineDash(float[]) and setLineDash(int[]]). These methods are implemented at the SWTGraphics level. But org.eclipse.draw2d.ScaledGraphics only expose setLineDash(int[]]).

I must use setLineDash(float[]) for higher precision and I can not subclass the ScaledGraphics.

Reproducible: Always

Steps to Reproduce:
See org.eclipse.draw2d.ScaledGraphics, it does not override org.eclipse.draw2d.Graphics' setLineDash(float[]) to redirect the call to the wrapped Graphics object.
Comment 1 Romain Raugi CLA 2010-11-10 04:43:35 EST
Created attachment 182795 [details]
The proposed patch.
Comment 2 Alexander Nyßen CLA 2010-11-10 18:25:38 EST
Added setLineDash(float[]) method to ScaledGraphics, which simply delegates to the respective method in the underlying graphics.

Change committed to cvs HEAD (3.7).