app_server: add Canvas::PenToLocalTransform

This commit is contained in:
Julian Harnath 2015-07-08 21:16:30 +02:00
parent 8511f6ac9b
commit ae0468762f
2 changed files with 12 additions and 1 deletions

View File

@ -188,6 +188,17 @@ Canvas::PenToScreenTransform() const GCC_2_NRV(transform)
}
SimpleTransform
Canvas::PenToLocalTransform() const GCC_2_NRV(transform)
{
#if __GNUC__ >= 3
SimpleTransform transform;
#endif
fDrawState->Transform(transform);
return transform;
}
SimpleTransform
Canvas::ScreenToPenTransform() const GCC_2_NRV(transform)
{
@ -218,4 +229,3 @@ OffscreenCanvas::ResyncDrawState()
{
fDrawingEngine->SetDrawState(fDrawState);
}

View File

@ -57,6 +57,7 @@ public:
SimpleTransform LocalToScreenTransform() const;
SimpleTransform ScreenToLocalTransform() const;
SimpleTransform PenToScreenTransform() const;
SimpleTransform PenToLocalTransform() const;
SimpleTransform ScreenToPenTransform() const;
virtual DrawingEngine* GetDrawingEngine() const = 0;