Implement Canvas support for iced_tiny_skia

This commit is contained in:
Héctor Ramón Jiménez 2023-03-01 21:34:26 +01:00
parent 3f6e28fa9b
commit 5fd5d1cdf8
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
65 changed files with 1354 additions and 570 deletions

View file

@ -4,11 +4,14 @@ pub mod window;
mod backend;
mod settings;
pub use iced_graphics::primitive;
pub use backend::Backend;
pub use primitive::Primitive;
pub use settings::Settings;
pub use iced_graphics::{
Antialiasing, Color, Error, Font, Point, Size, Viewport,
Antialiasing, Color, Error, Font, Point, Rectangle, Size, Vector, Viewport,
};
/// The default graphics renderer for [`iced`].
@ -16,3 +19,12 @@ pub use iced_graphics::{
/// [`iced`]: https://github.com/iced-rs/iced
pub type Renderer<Theme = iced_native::Theme> =
iced_graphics::Renderer<Backend, Theme>;
#[derive(Debug, Clone)]
pub struct Geometry(pub(crate) Primitive);
impl From<Geometry> for Primitive {
fn from(geometry: Geometry) -> Self {
geometry.0
}
}