diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-12-23 08:39:26 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-01-30 19:16:48 +0100 |
commit | f7647d5adaaed4c651cb2e65c7ce66d7ef6639f1 (patch) | |
tree | a121b8cb94b63e5b871f5b329e621707114c0cdd /src/quick/items/qquickimagebase_p_p.h | |
parent | 9cc4568de330e0075c960a5431ecd69a1f9a761d (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_p.h')
-rw-r--r-- | src/quick/items/qquickimagebase_p_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickimagebase_p_p.h b/src/quick/items/qquickimagebase_p_p.h index 88e18ba32e..00a9295ef0 100644 --- a/src/quick/items/qquickimagebase_p_p.h +++ b/src/quick/items/qquickimagebase_p_p.h @@ -86,6 +86,7 @@ public: QSize sourcesize; QSize oldSourceSize; qreal devicePixelRatio; + QRectF sourceClipRect; QQuickImageProviderOptions providerOptions; int currentFrame; int frameCount; |