* 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.
* Add IsDilation() to BAffineTransform and Transformable which check
whether the transform is a dilation, i.e. consists of only
translation and/or scaling
inline const floats are a gcc extension. It is possible to do it in a
standard way in C++11 using constexpr, but then gcc will reject the
previously accepted nonstandard syntax.
* Added commented versions for translation, rotation and shear, which would
work similar.
* Added B_AFFINE_IDENTITY_TRANSFORM constant similar to B_ORIGIN.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36401 a95241bf-73f2-0310-859d-f6bbb57e9c96
in the AGG header. Reused the AGG code were applicable and implemented a lot
more features. The Multiply and PreMultiply meaning is reversed with respect to
AGG, but follows the mathematical meaning. Added type_code
B_AFFINE_TRANSFORM_TYPE to TypeConstants.h and let BAffineTransform derive from
BFlattenable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35958 a95241bf-73f2-0310-859d-f6bbb57e9c96