Bug 130339

Summary: Graphics: Expose transform api in SWT GC to allow for advanced transformations
Product: [Tools] GEF Reporter: Steven R. Shaw <steveshaw>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: ahunter.eclipse, irbull, lizeray
Version: 3.2Keywords: api
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Steven R. Shaw CLA 2006-03-03 11:36:31 EST
No way to expose advanced transformation capabilities at a draw2d level.  API required to in Graphics interface to allow this.
Comment 1 Randy Hudson CLA 2006-03-03 12:00:36 EST
Every method that is on Transform, is also on draw2d Graphics, which manages a Transform object internally so that it can push and pop states, and so that it can modify the current clipping when possible.

We could allow someone to set the transform exactly, just like we allow setClipping. But I'm not sure how that would be better.
Comment 2 Steven R. Shaw CLA 2006-03-03 12:05:47 EST
When mapping between AWT Graphics2D to draw2d Graphics it's not possible to extract a rotation value from the transform.  This will be a requirement when (if) Batik gets integrated into GEF down the line so that we can render the Batik SVG directly onto a Graphics2D adaptor that maps to a draw2d Graphics class.  Currently I have to bypass the draw2d graphics object and map directly to an SWT GC.
Comment 3 Randy Hudson CLA 2006-03-03 14:25:22 EST
A method which takes 6 floats would be fine with me. But this requires careful testing with regards to pushing the state (probably can't be supported) and throwing out the Clipping representation.
Comment 4 Anthony Hunter CLA 2008-07-10 14:51:09 EDT
(In reply to comment #2)
> [...] Currently I have to bypass the draw2d graphics object and map directly
> to an SWT GC.
> 

Steve, where is this code?