-
Notifications
You must be signed in to change notification settings - Fork 144
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
fix scale, rename transform to translate #590
Conversation
This doesn't claim to implement rotation. rotation would have to be even more special handling in the renderer |
This also doesn't fix event handling. I'll do that in another PR |
src/style.rs
Outdated
@@ -1646,8 +1647,10 @@ prop_extractor! { | |||
pub scale_x: ScaleX, | |||
pub scale_y: ScaleY, | |||
|
|||
pub transform_x: TransformX, | |||
pub transform_y: TransformY, | |||
pub transform_x: TranslateX, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably forgot the prop name here
This is great, thank you @jrmoulton! It fixes font rendering when scaling.
Maybe this gets easier if all transformations are consistently handled as a single affine transformation matrix (which is already partially the case). At the moment, with the vger renderer, we extract the individual properties (like translation and scale) from the transformation matrix instead of applying it directly. Maybe it makes sense to change this when we switch to Vello? I've seen that its API has first-class support for passing transformation matrices. Anyways, I don't need rotation for my use case right now, but I think it would be nice to have eventually (for animations, spinners, etc). |
This can sometimes trigger some strange effects when animating scale. It doesn't happen consistently. I've watched all of the scale values that affect the different properties while animating and they look correct. I now believe this is some bug in vger and not in these changes output2.mp4 |
yeah in my branch for vello this should already be handled. |
output3.mp4 |
@timsueberkrueb