mirror of
https://review.haiku-os.org/haiku
synced 2025-02-22 21:48:35 +01:00
* The existing methods TranslateBy(), ScaleBy() and RotateBy() transform the transformation. For a transform A, a point p, and the temporary transform B (being applied by the methods), this results in p' = B*(A*p) = (B*A)*p This is not necessarily the desired result. Suppose A is a translation and B a rotation, added by RotateBy(). Then B*A means that the translation itself is rotated, so B moves the coordinate origin itself, by rotating it around the original origin of the coordinate system (top left view corner). If we want to translate and then rotate around that *new* origin, we need to multiply the transforms the other way around: A*B. Three new methods PreTranslateBy(), PreScaleBy() and PreRotateBy() implement this. They are later used as a base to add translatation/ scaling/rotation methods to BView which behave in the expected ordering, similar to other graphic APIs.