MCPcopy Create free account
hub / github.com/Kethku/Pando / push_layer

Method push_layer

aspen/src/context_stack/draw_context.rs:222–233  ·  view source on GitHub ↗
(&mut self, clip: &impl Shape)

Source from the content-addressed store, hash-verified

220 }
221
222 pub fn push_layer(&mut self, clip: &impl Shape) {
223 {
224 // Clone most recent local transform onto the stack
225 let local_transform = self.local_transform_stack.last().copied().unwrap();
226 self.local_transform_stack.push(local_transform);
227 }
228
229 let transform = self.current_transform();
230 self.scene
231 .push_clip_layer(StyleRef::Fill(Fill::EvenOdd), transform, clip);
232 self.clip_stack.push(transform * clip.to_path(0.1));
233 }
234
235 pub fn pop_layer(&mut self) {
236 self.local_transform_stack.pop();

Callers 1

drawMethod · 0.80

Calls 1

current_transformMethod · 0.80

Tested by

no test coverage detected