Checkpoint: beziers

This commit is contained in:
Antonio Scandurra 2023-10-10 13:01:35 +02:00
parent fe60f264c4
commit a4afb72535
6 changed files with 397 additions and 97 deletions

View file

@ -363,12 +363,11 @@ impl<'a, 'w> WindowContext<'a, 'w> {
);
}
pub fn paint_path(&mut self, mut path: Path<Pixels>) {
pub fn paint_path(&mut self, mut path: Path<Pixels>, color: impl Into<Hsla>) {
let scale_factor = self.scale_factor();
let content_mask = self.content_mask();
for vertex in &mut path.vertices {
vertex.content_mask = content_mask.clone();
}
path.content_mask = content_mask;
path.color = color.into();
let window = &mut *self.window;
window
.scene_builder