[OpenJDK 2D-Dev] How are transformations done and some other questions

Clemens Eisserer linuxhippy at gmail.com
Mon May 19 22:55:12 UTC 2008


Hi Jim,

Thanks a lot for your reply.

> I'd wager that trying to deduce the original transform from the parameters
> at that point in the pipeline would be counter-productive since the
> destination coordinates represent the product of the coordinates that the
> user requested and the current transform, so you may end up trying to set a
> transform that is "a scale transform", but not the same scale as the
> currently established transform.
Well, my ideas where simply wrong.
Destination coordinates are not transformed by the transformation
matrix, the matrix only applies to the source surface used.

> With XRender, could you have multiple contexts - one validated with the
> current transform, one validated with no transform, and then choose which of
> the two to use in a given case?  X11 has no problem with having an unlimited
> number of outstanding contexts each with its own set of rendering attributes
> so I would hope that XRender followed that model. Of course, if the
> transform is on the surface rather than the context, then that might blow
> that theory out of the water.
Yes, the transform (the whole state) is on the source surface.

Furthermore it seems that windows as source-pictures don't work,
although they should.
A bit frustrating :-/

Thanks for your patience, Clemens



More information about the 2d-dev mailing list