22 #include "basemanager.h"
39 QPointF mapCanvasToScreen( QPointF p );
40 QPointF mapScreenToCanvas( QPointF p );
42 QRectF mapCanvasToScreen(
const QRectF& rect );
43 QRectF mapScreenToCanvas(
const QRectF& rect );
45 QPainterPath mapCanvasToScreen(
const QPainterPath& path );
46 QPainterPath mapScreenToCanvas(
const QPainterPath& path );
48 QPointF translation() {
return mTranslate; }
49 void translate(
float dx,
float dy );
50 void translate( QPointF offset );
52 float rotation() {
return mRotate; }
53 void rotate(
float degree );
55 float scaling() {
return mScale; }
56 void scale(
float scaleValue );
60 void flipHorizontal(
bool b );
61 void flipVertical(
bool b );
63 bool isFlipHorizontal() {
return mIsFlipHorizontal; }
64 bool isFlipVertical() {
return mIsFlipVertical; }
66 void setCanvasSize( QSize size );
68 Q_SIGNAL
void viewChanged();
71 void updateViewTransforms();
74 QTransform mViewInverse;
75 QTransform mViewCanvas;
76 QTransform mViewCanvasInverse;
83 QSize mCanvasSize = { 1, 1 };
85 bool mIsFlipHorizontal =
false;
86 bool mIsFlipVertical =
false;
89 #endif // VIEWMANAGER_H