Bug 130339 - Graphics: Expose transform api in SWT GC to allow for advanced transformations
Summary: Graphics: Expose transform api in SWT GC to allow for advanced transformations
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2006-03-03 11:36 EST by Steven R. Shaw CLA
Modified: 2008-07-10 14:51 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?