summaryrefslogtreecommitdiffstats
path: root/tiny_skia
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-09-10 23:54:05 +0200
committerLibravatar GitHub <noreply@github.com>2024-09-10 23:54:05 +0200
commit2a17afb7374deabcc7571688e58fcce01182d646 (patch)
treeee262e6998a189cf7a9e088e79e0094ec667d308 /tiny_skia
parentf7bca570c3d0e73ce57a0406319c606e7c5f1463 (diff)
parentfe8f41278dc922e12ffeb7a50bfb17a47b4bf956 (diff)
downloadiced-2a17afb7374deabcc7571688e58fcce01182d646.tar.gz
iced-2a17afb7374deabcc7571688e58fcce01182d646.tar.bz2
iced-2a17afb7374deabcc7571688e58fcce01182d646.zip
Merge pull request #2473 from vladh/add-stroke-rectangle
Add stroke_rectangle
Diffstat (limited to 'tiny_skia')
-rw-r--r--tiny_skia/src/geometry.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs
index 659612d1..0d5fff62 100644
--- a/tiny_skia/src/geometry.rs
+++ b/tiny_skia/src/geometry.rs
@@ -168,6 +168,15 @@ impl geometry::frame::Backend for Frame {
});
}
+ fn stroke_rectangle<'a>(
+ &mut self,
+ top_left: Point,
+ size: Size,
+ stroke: impl Into<Stroke<'a>>,
+ ) {
+ self.stroke(&Path::rectangle(top_left, size), stroke);
+ }
+
fn fill_text(&mut self, text: impl Into<geometry::Text>) {
let text = text.into();