Affine transforms - matrix algebra
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Tue Jul 17 11:44:34 PDT 2012
Hello Graham
My interpretation was that Java2D/Postscript/HTML5 "translate" and
"scale" were designed the way they are not because there is a "right"
and "wrong" views, but simply because they were the most frequently used
ways. At least in the code a saw and wrote, Java2D concatenate-like
operations were quite more frequent than preConcatenate-like operations.
I think we would still have used the "translate" and "scale" names if
they were available. But since we have to find other names, what else
can we use?
Martin
Le 17/07/12 20:20, Jim Graham a écrit :
> I think we disagree as to what "translate then scale" means. To me,
> it is ambiguously referring to two totally different outcomes which
> depend on your perspective as "translate me and then scale me" or
> "translate that thing and then scale it". There is no "right and
> wrong" and any discussion that uses those words is simply burying
> their head in their own default interpretation and ignoring that
> people see things differently.
>
> Similarly with append and prepend - they do not remove the ambiguity,
> they simply provide a name for it. If you think the "translate" and
> "scale" names from 2D worked opposite from your default view (which
> you may not realize was just one of 2 possible views, there is no
> right or wrong), then append does not explicitly resolve the issue -
> it is just as ambiguous as your existing "my view was right and
> someone else got it wrong" mistaken impression.
>
> The only way that "append" can be interpreted unambiguously from the
> current FX context is if it works as if one appended some Transform
> nodes to the list in Node's "getTransforms()" List<Transform>, but
> even that may not match another engineer's default interpretation.
> That is the only definition we currently have of append in the current
> set of APIs. If your append* methods will work differently than that
> interpretation then you are creating an inconsistency. (Note that
> ObservableList.add is consistent with List.add which defines the
> operation as "append" so the order implied by that term has already
> been spoken for.)
>
> Note that Java2D didn't invent its interpretation of what it means to
> "translate(), then scale()" - we are doing the same thing that
> PostScript did which predates any of this by a few years. We also
> happen to be doing the same thing that the latest transform standard
> for the web is doing - HTML5 Canvas/GraphicsContext...
>
> ...jim
More information about the openjfx-dev
mailing list