diff options
author | 2024-06-21 10:41:17 +0100 | |
---|---|---|
committer | 2024-09-10 23:44:04 +0200 | |
commit | ec39390c23cd46a115bb0528abdb2c5527f1272a (patch) | |
tree | 104c7209bc2c37cdd332b31d8308237461a22a63 /renderer | |
parent | abd323181d613f1dc69b6cbe885dce556f427de2 (diff) | |
download | iced-ec39390c23cd46a115bb0528abdb2c5527f1272a.tar.gz iced-ec39390c23cd46a115bb0528abdb2c5527f1272a.tar.bz2 iced-ec39390c23cd46a115bb0528abdb2c5527f1272a.zip |
Add stroke_rectangle
This method should be able to leverage performance improvements in lyon's
`tessellate_rectangle` over `tessellate_path`.
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/src/fallback.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/renderer/src/fallback.rs b/renderer/src/fallback.rs index fbd285db..8cb18bde 100644 --- a/renderer/src/fallback.rs +++ b/renderer/src/fallback.rs @@ -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)); } |