Animations of controls inside viewbox when scaled up are jagged
See original GitHub issueI have a window with a content like this:
<Viewbox>
<Grid Width="30" Height="30">
<Rectangle Stroke="Black" StrokeThickness="1" Fill="Red" Width="10" Height="10"/>
</Grid>
</Viewbox>
The code behind has this method:
private void Rectangle_Tapped (object sender, Avalonia.Interactivity.RoutedEventArgs e)
{
Animation anim = new Animation()
{
Duration = TimeSpan.FromSeconds(20d),
Children = {
new KeyFrame()
{
Cue = new Cue(0d),
Setters = {
new Setter { Property = WidthProperty, Value = 10d }
}
},
new KeyFrame()
{
Cue = new Cue(1d),
Setters = {
new Setter{ Property = WidthProperty, Value = 30d }
}
}
}
};
anim.Apply((Animatable) ((Grid) ((Viewbox) Content).Child).Children[0], null, Observable.Return(true), null);
}
The constructor has this line: ((Rectangle) ((Grid) ((Viewbox) Content).Child).Children[0]).Tapped += Rectangle_Tapped;
This is the output:
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Animated viewBox - transform scale is blury · Issue #1451
My issue is that whenever I animate my svg with a transform function it ends up being blury when I zoom in. The...
Read more >A Deep Dive Into The Wonderful World Of SVG ...
SVG feDisplacement filter: how to deal with jagged edges · Don't Give Up On Webkit! · Creating SVG Displacement Maps And Getting Them...
Read more >RoutedEventArgs Class - Typedescriptor
InvalidOperationException: The control already has a visual parent. #4839 ... Animations of controls inside viewbox when scaled up are jagged #4563.
Read more >Animated SVG vs GIF [CAGEMATCH]
An SVG image will look super crisp on any screen resolution, no matter how much you scale it up. Whereas GIFs—a raster image...
Read more >Let's Learn Blender! #5: Smoothing & Hard Edges - YouTube
... Tutorial Summary - 35:13 - Video Wrap- Up, Social Media, & Call to Action *Don't for get to click LIKE & SUBSCRIBE...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You could add/remove classes with the “Classes” property btw 😃 so you can have a certain class removed/added on codebehind then set your animation in styles
Thanks for the reply! But it’s off topic I guess…