Skip to content
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

Expose the scale value from Renderer. #444

Merged
merged 1 commit into from
May 13, 2024

Conversation

timboudreau
Copy link
Contributor

Rationale: It is possible to set the scale on a PaintCx, but not to restore it to its previous value, and PaintCx.save() and PaintCx.restore() do not handle it, since it is writing directly to a property of the underlying renderer.

Use-case: In order to debug layout issues, it is useful to be able to scale a component's content down, render it that way and observe if there is any painting outside the expected bounds.

Rationale: It is possible to set the scale on a PaintCx, but not to restore it to its previous value,
and `PaintCx.save()` and `PaintCx.restore()` do not handle it, since it is writing directly to a property
of the underlying renderer.

Use-case: In order to debug layout issues, it is useful to be able to scale a component's content down,
render it that way and observe if there is any painting outside the expected bounds.
@dzhou121 dzhou121 merged commit 1a4fc03 into lapce:main May 13, 2024
7 checks passed
@timboudreau timboudreau deleted the expose_renderer_scale branch May 13, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants