BView: add methods for affine translation/scaling/rotation
* BView::TranslateBy(), BView::ScaleBy() and BView::RotateBy() allow to conveniently modify the current affine transformation. This makes it unnecessary to first read the current transform, modify it, and then set it again. Uses the new Pre...() methods of BAffineTransform. * Also, remove setting the transform "through" to the BView even while recording a BPicture, as this now results in transforms being applied more than once.
This commit is contained in:
@@ -41,6 +41,9 @@ public:
|
||||
const float& miterLimit);
|
||||
status_t WriteSetScale(const float& scale);
|
||||
status_t WriteSetTransform(BAffineTransform transform);
|
||||
status_t WriteTranslateBy(double x, double y);
|
||||
status_t WriteScaleBy(double x, double y);
|
||||
status_t WriteRotateBy(double angleRadians);
|
||||
status_t WriteSetPattern(const ::pattern& pattern);
|
||||
status_t WriteClipToPicture(int32 pictureToken,
|
||||
const BPoint& origin, bool inverse);
|
||||
|
||||
Reference in New Issue
Block a user