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:
parent
abd323181d
commit
ec39390c23
4 changed files with 100 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue