-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vg/draw: Cropped canvases don't fill text according to the crop #522
Comments
The obvious fix breaks everything else. This may be a documentation issue. |
Would you post a small reproducer and the image it generates for you, please? |
ping @josharian ? |
I think you have to draw at canvas.Min rather than (0,0). The absolute coordinates are always relative to the parent canvas rather than the cropped one. As mentioned above, documentation could probably be improved. |
@ctessum has it exactly right. If I were redesigning this, I would encourage each canvas to have its own coordinate space, since this makes the mental model easier. But we're not---so this is just a docs issue. (So I'm not going to spend time putting together a reproducer, apologies.) |
It seems to me there should be a simple way to set an origin offset after cropped This at least should be fixed. |
What I did:
Expected:
The string at (0,0) of the cropped canvas.
Got:
The string at (0,0) of the uncropped canvas.
It seems that the FillString method needs to be made aware of any cropping.
The text was updated successfully, but these errors were encountered: