(&self, cx: &mut DrawContext)
| 75 | } |
| 76 | |
| 77 | fn draw(&self, cx: &mut DrawContext) { |
| 78 | let region = cx.region().to_rounded_rect(self.radius); |
| 79 | if self.background_separation > 0. { |
| 80 | cx.set_fill_brush(Brush::Solid(Color::new([0., 0., 0., 0.5]))); |
| 81 | cx.blurred( |
| 82 | region + Vec2::new(0., self.background_separation), |
| 83 | self.background_separation * 2., |
| 84 | ); |
| 85 | } |
| 86 | |
| 87 | cx.set_fill_brush(self.fill.clone()); |
| 88 | cx.set_stroke_brush(self.stroke.clone()); |
| 89 | cx.set_stroke_style(Stroke::new(self.thickness)); |
| 90 | cx.stroked_fill(®ion); |
| 91 | |
| 92 | self.child.draw(cx); |
| 93 | } |
| 94 | |
| 95 | fn children(&self) -> Vec<Token> { |
| 96 | self.child.tokens() |
nothing calls this directly
no test coverage detected