Add stroke_rectangle

This method should be able to leverage performance improvements in lyon's
`tessellate_rectangle` over `tessellate_path`.
This commit is contained in:
Vlad-Stefan Harbuz 2024-06-21 10:41:17 +01:00 committed by Héctor Ramón Jiménez
parent abd323181d
commit ec39390c23
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 100 additions and 0 deletions

View file

@ -540,6 +540,19 @@ mod geometry {
delegate!(self, frame, frame.stroke(path, stroke));
}
fn stroke_rectangle<'a>(
&mut self,
top_left: Point,
size: Size,
stroke: impl Into<Stroke<'a>>,
) {
delegate!(
self,
frame,
frame.stroke_rectangle(top_left, size, stroke)
);
}
fn fill_text(&mut self, text: impl Into<Text>) {
delegate!(self, frame, frame.fill_text(text));
}