DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42793>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42793

           Summary: Ability to add an instance of
                    java.awt.geom.AffineTransform as a transcoding hint
           Product: Batik
           Version: 1.7
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: SVG Rasterizer
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


It would be useful to be able to add an instance of 
java.awt.geom.AffineTransform as a transcoding hint when rasterizing images. 
This would allow e.g. rotation and scaling.

Implementing this would be fairly simple - if I did not miss anything, it 
requires a couple of lines in SVGAbstractTranscoder.transcode, after (lines 286-
291)

286        if (cgn != null) {
287            cgn.setViewingTransform(Px);
288            curTxf = new AffineTransform();
289        } else {
290            curTxf = Px;
291        }

  I think inserting something like this after the above should do it:

        // constant KEY_TRANSFORM needs to be defined, of course
        if (hints.containsKey(KEY_TRANSFORM)) {
          AffineTransform a = (AffineTransform)hints.get(KEY_TRANSFORM);
          curTxf.concatenate(a);
        }

ATM, it is not possible to affect the value of (protected instance variable) 
curTxf during transcoding even by subclassing ImageTranscoder as curTxf is 
internally set during the transcoding operation (the above lines of quoted 
code).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to