Skip to content

Commit 6d1c2ec

Browse files
Fix transparent export
1 parent 05abc87 commit 6d1c2ec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

node-graph/gstd/src/render_node.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,9 @@ async fn render<'a: 'n>(
199199
}
200200
}
201201

202-
let mut background = Color::from_rgb8_srgb(0x22, 0x22, 0x22);
203-
if !contains_artboard && !render_params.hide_artboards {
204-
background = Color::WHITE;
205-
}
206-
207202
if matches!(render_output_request_type, RenderOutputTypeRequest::Buffer) {
208203
let texture = exec
209-
.render_vello_scene_to_texture(&scene, footprint.resolution, context, background)
204+
.render_vello_scene_to_texture(&scene, footprint.resolution, context, Color::TRANSPARENT)
210205
.await
211206
.expect("Failed to render Vello scene");
212207

@@ -220,6 +215,11 @@ async fn render<'a: 'n>(
220215
};
221216
}
222217

218+
let mut background = Color::from_rgb8_srgb(0x22, 0x22, 0x22);
219+
if !contains_artboard && !render_params.hide_artboards {
220+
background = Color::WHITE;
221+
}
222+
223223
if let Some(surface_handle) = surface_handle {
224224
exec.render_vello_scene(&scene, &surface_handle, footprint.resolution, context, background)
225225
.await

0 commit comments

Comments
 (0)