Important: Please read the Qt Code of Conduct -

Select intersect between two layers

  • In photoshop, there's a feature that allows for selecting intersect between two layers. How can this be achieved in qml.
    Ps: I intend to crop out the intersection as a new qml element and discard the other part. Any help

  • Moderators

    you mean something like masking?

  • I've initially intended to provide a solution similar to whatsapp profile page image selection.
    My approach was this;

    1. create a zoom-able square object with drag and drop functionality as well as pinch area support that has a color set to transparent and a well defined border width which overlays the uploaded picture
    2. Drag and pinch the square object to fit the desired parts of the picture
    3. Determine the x,y width and height of the square object and use in cropping the image in C++
    4. use QQuickImageProvider to load the image to the new redirect page
    5. Use opacity mask to create a circular image for the already square image

    This entire solution looks like a hack though
    I hope and think there should be a better way but I'm not yet able to wrap my head around a better way though.

    Thanks for the concerns

Log in to reply