mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-28 00:44:10 +00:00
Fix Vello rendering the infinite canvas without a white background color (#2361)
Fix infinite canvas for vello Remove debugging fill Remove debug log
This commit is contained in:
parent
e7cde88c04
commit
6becaef980
3 changed files with 11 additions and 6 deletions
|
@ -136,7 +136,11 @@ async fn render_canvas(render_config: RenderConfig, data: impl GraphicElementRen
|
|||
// TODO: Instead of applying the transform here, pass the transform during the translation to avoid the O(Nr cost
|
||||
scene.append(&child, Some(kurbo::Affine::new(footprint.transform.to_cols_array())));
|
||||
|
||||
exec.render_vello_scene(&scene, &surface_handle, footprint.resolution.x, footprint.resolution.y, &context)
|
||||
let mut background = Color::from_rgb8_srgb(0x22, 0x22, 0x22);
|
||||
if !data.contains_artboard() && !render_config.hide_artboards {
|
||||
background = Color::WHITE;
|
||||
}
|
||||
exec.render_vello_scene(&scene, &surface_handle, footprint.resolution.x, footprint.resolution.y, &context, background)
|
||||
.await
|
||||
.expect("Failed to render Vello scene");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue