aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickimagebase_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2019-12-23 08:39:26 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-01-30 19:16:48 +0100
commitf7647d5adaaed4c651cb2e65c7ce66d7ef6639f1 (patch)
treea121b8cb94b63e5b871f5b329e621707114c0cdd /src/quick/items/qquickimagebase_p.h
parent9cc4568de330e0075c960a5431ecd69a1f9a761d (diff)
Add Image.sourceClipRect property
Since we set sourceSize, we expect to use that coordinate system in sourceClipRect too. Therefore we use QImageReader::setScaledClipRect(), not setClipRect(). [ChangeLog][QtQuick][Image] Image now has a sourceClipRect property to render a clipped image from a region of the sourceSize. Change-Id: If08277df772c2ab1063dd88572e49de41b97bca4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquickimagebase_p.h')
-rw-r--r--src/quick/items/qquickimagebase_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickimagebase_p.h b/src/quick/items/qquickimagebase_p.h
index 9308230bfa..238b31b2e5 100644
--- a/src/quick/items/qquickimagebase_p.h
+++ b/src/quick/items/qquickimagebase_p.h
@@ -107,6 +107,10 @@ public:
QSize sourceSize() const;
void resetSourceSize();
+ QRectF sourceClipRect() const;
+ void setSourceClipRect(const QRectF &r);
+ void resetSourceClipRect();
+
virtual void setMirror(bool mirror);
bool mirror() const;
@@ -134,6 +138,7 @@ Q_SIGNALS:
void mirrorChanged();
Q_REVISION(14) void currentFrameChanged();
Q_REVISION(14) void frameCountChanged();
+ Q_REVISION(15) void sourceClipRectChanged();
protected:
void loadEmptyUrl();