How to crop an image inside an item (rectangle)?
I would like to load and display a picture (.png) inside a circle (rectangle) that I have defined. I have done some tries with Image.PreserveAspectCrop but they were not conclusive. I want my image to perfectly fit the border of the circle. Is that possible with Qt Quick?
Thanks a lot!
You could use a Canvas and the clip API (see "the Canvas example":http://qt-project.org/doc/qt-5/qtquick-canvas-example.html
I will investigate this path and hopefully this would help me!
Or you could use "OpacityMask":http://qt-project.org/doc/qt-5/qml-qtgraphicaleffects-opacitymask.html.
Woooow! Perfect! That's exactly what I need! Thank you so much