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:
@@ -300,6 +300,9 @@ public:
|
||||
// more powerful alternative.
|
||||
void SetTransform(BAffineTransform transform);
|
||||
BAffineTransform Transform() const;
|
||||
void TranslateBy(double x, double y);
|
||||
void ScaleBy(double x, double y);
|
||||
void RotateBy(double angleRadians);
|
||||
|
||||
void PushState();
|
||||
void PopState();
|
||||
|
||||
Reference in New Issue
Block a user