Skip to content

Clipping fails using image mask and units != px #83

Description

@amtravco

Clipping gives strange results when the clip mask is an image and the units are not pixels. In the code snippet, if "px" is changed to, say, "mm" the clipping gives a very strange result.

background(1)

fill(0.5, 0.5, 0.5, 1.0)

with clip(image('circle.pdf', 20, 20)):
    rect(0,0,200, 200)                  # Rectangle covering entire canvas```

<img width="5873" height="3211" alt="Image" src="https://github.com/user-attachments/assets/690be3bb-befe-4256-9378-3030f50a3fc9" />

[circle.pdf](https://github.com/user-attachments/files/21583838/circle.pdf)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions