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

Bug 329873

Summary: setLineDash(float[]) in ScaledGraphics
Product: [Tools] GEF Reporter: Romain Raugi <romain.raugi>
Component: GEF-Legacy Draw2dAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen, romain.raugi
Version: 3.6.1   
Target Milestone: 3.7.1 (Indigo) M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
The proposed patch. wayne.beaton: iplog+

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).