mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 17:15:56 +00:00
Merge main into feat/character-anti-aliasing-method
This commit is contained in:
@@ -65,6 +65,7 @@ impl Renderer {
|
||||
blends: PtrMap::default(),
|
||||
clip_paths: vec![],
|
||||
picture: None,
|
||||
image_left_out: None,
|
||||
offscreen_live: 0,
|
||||
offscreen_budget: 0,
|
||||
symbol_nodes: 0,
|
||||
@@ -128,7 +129,12 @@ impl Renderer {
|
||||
self.begin_frame();
|
||||
// View Opacity Mask: the mask's coverage in greyscale instead of the artwork.
|
||||
if let Some(m) = opts.mask_view.and_then(|id| doc.node(id)).and_then(|n| n.extras().mask.as_deref()) {
|
||||
let pixels = self.mask_values(&frame, m, w, h).into_iter().flat_map(|v| [v, v, v, 255]).collect();
|
||||
let pixels = self
|
||||
.mask_values(&frame, m, w, h)
|
||||
.unwrap_or_else(|| vec![0; w as usize * h as usize])
|
||||
.into_iter()
|
||||
.flat_map(|v| [v, v, v, 255])
|
||||
.collect();
|
||||
self.end_frame();
|
||||
self.stats.symbol_art = symbols.art_measured();
|
||||
self.stats.micros = now().saturating_sub(start);
|
||||
|
||||
Reference in New Issue
Block a user