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

Method new

aspen/src/context_stack/draw_context.rs:50–65  ·  view source on GitHub ↗
(context: AttachedContext<'a>, mouse_region_manager: &'a mut MouseRegionManager, child_lookup: &'a HashMap<Token, HashSet<Token>>, regions: &'a HashMap<Token, (Affine, Size)>, scene: &'a mut Scene)

Source from the content-addressed store, hash-verified

48
49impl<'a> DrawContext<'a> {
50 pub fn new(context: AttachedContext<'a>, mouse_region_manager: &'a mut MouseRegionManager, child_lookup: &'a HashMap<Token, HashSet<Token>>, regions: &'a HashMap<Token, (Affine, Size)>, scene: &'a mut Scene) -> Self {
51 DrawContext {
52 context,
53 mouse_region_manager,
54 mouse_region_count: 0,
55 child_lookup,
56 regions,
57 stroke_style: Stroke::new(2.),
58 stroke_brush: Brush::Solid(Color::BLACK),
59 fill_brush: Brush::Solid(Color::WHITE),
60 element_transform: Affine::IDENTITY,
61 local_transform_stack: vec![Affine::IDENTITY],
62 clip_stack: vec![],
63 scene,
64 }
65 }
66
67 pub fn set_stroke_style(&mut self, stroke_style: Stroke) {
68 self.stroke_style = stroke_style;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected