summaryrefslogtreecommitdiffstats
path: root/tiny_skia
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-22 01:35:14 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-22 01:35:14 +0100
commit53a183fe0d6aed460fbb8155ac9541757277aab3 (patch)
tree449574ac4d2d14a146db74a1fd96e8075a394db4 /tiny_skia
parentb972ebca8f8c23d2df1b45bb26038789766a5a65 (diff)
downloadiced-53a183fe0d6aed460fbb8155ac9541757277aab3.tar.gz
iced-53a183fe0d6aed460fbb8155ac9541757277aab3.tar.bz2
iced-53a183fe0d6aed460fbb8155ac9541757277aab3.zip
Restore `canvas::Frame` API
Diffstat (limited to 'tiny_skia')
-rw-r--r--tiny_skia/src/geometry.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs
index 6b1888d0..76482e12 100644
--- a/tiny_skia/src/geometry.rs
+++ b/tiny_skia/src/geometry.rs
@@ -35,7 +35,7 @@ impl Frame {
}
}
-impl geometry::Frame for Frame {
+impl geometry::frame::Backend for Frame {
type Geometry = Primitive;
fn width(&self) -> f32 {
@@ -228,11 +228,9 @@ impl geometry::Frame for Frame {
self.transform = self.transform.pre_scale(scale.x, scale.y);
}
-}
-impl From<Frame> for Primitive {
- fn from(frame: Frame) -> Self {
- frame.into_primitive()
+ fn into_geometry(self) -> Self::Geometry {
+ self.into_primitive()
}
}