File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -182,14 +182,15 @@ async fn render<'a: 'n>(
182182 let mut scene = vello:: Scene :: new ( ) ;
183183 scene. append ( child, Some ( footprint_transform_vello) ) ;
184184
185- let encoding = scene . encoding_mut ( ) ;
185+ let resolution = ( footprint . resolution . as_dvec2 ( ) * render_params . scale ) . as_uvec2 ( ) ;
186186
187187 // We now replace all transforms which are supposed to be infinite with a transform which covers the entire viewport
188188 // See <https://xi.zulipchat.com/#narrow/channel/197075-vello/topic/Full.20screen.20color.2Fgradients/near/538435044> for more detail
189-
189+ let scaled_infinite_transform = vello:: kurbo:: Affine :: scale_non_uniform ( resolution. x as f64 , resolution. y as f64 ) ;
190+ let encoding = scene. encoding_mut ( ) ;
190191 for transform in encoding. transforms . iter_mut ( ) {
191192 if transform. matrix [ 0 ] == f32:: INFINITY {
192- * transform = vello_encoding:: Transform :: from_kurbo ( & ( vello :: kurbo :: Affine :: scale_non_uniform ( footprint . resolution . x as f64 , footprint . resolution . y as f64 ) ) )
193+ * transform = vello_encoding:: Transform :: from_kurbo ( & scaled_infinite_transform ) ;
193194 }
194195 }
195196
You can’t perform that action at this time.
0 commit comments