-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Transform
primitive
#2120
Merged
Merged
Transform
primitive
#2120
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x7CFE
reviewed
Oct 23, 2023
0x7CFE
reviewed
Oct 23, 2023
hecrj
force-pushed
the
transform-primitive
branch
from
October 24, 2023 00:46
3748dd7
to
17c3d57
Compare
I wrote a feedback with a few notable issues on the iced Discourse. |
What about the rotation method? |
hecrj
force-pushed
the
transform-primitive
branch
from
February 2, 2024 01:32
6505051
to
d8dffa4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces the
Translate
primitive iniced_graphics
with a more genericTransform
primitive that can take any non-skewing affineTransformation
(i.e. scaling and translation).Additionally, a
transform
method has been implemented forGeometry
iniced_renderer
. This enables efficient translation and scaling of cached geometry with acanvas::Cache
, sincetransform
can be called on the returned cached geometry!But not only that, this new primitive can be used to effectively scale any part of the UI. This can be very useful for building node-based editors, for instance.
There are still some quirks to iron out here. Mainly, scaling text does not work currently, but that should be fairly easy to fix.