Skip to content

Feature Request: Image UV arbitrary quad #5802

@clembu

Description

@clembu

Is your feature request related to a problem? Please describe.

I'm working on an image cropping tool within a bigger app, where the user selects rectangles, and very well may rotate them. Somewhere next to the view of the full image, there is a preview of the crop, which means a view of the image mapped to the UVs selected by the user.

The road block is that widgets::Image.uv(...) takes a Rect which is by definition axis-aligned.

Describe the solution you'd like
I would appreciate something like a .uv_exact(Pos2,Pos2,Pos2,Pos2) method to select specific UVs.

Describe alternatives you've considered

  • Doing the texture rotations myself
    Means doing image processing and uploading new textures every time the user changes the rect's rotation and position, which is unacceptable overhead.
  • Another cheaper option could be putting a rotated image into a clipping region, which would work, though feels like it requires more work than needed: the renderer is going to be assigning images to a quad with four UV points anyway.

Additional context
To illustrate that I'm not talking about image rotations:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions