Move Canvas and QRCode to iced crate
Rename `canvas` modules to `geometry` in graphics subcrates
This commit is contained in:
parent
d13d19ba35
commit
6cc48b5c62
39 changed files with 140 additions and 148 deletions
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
|||
[features]
|
||||
image = []
|
||||
svg = []
|
||||
canvas = ["iced_native/canvas"]
|
||||
geometry = ["iced_graphics/geometry"]
|
||||
|
||||
[dependencies]
|
||||
raw-window-handle = "0.5"
|
||||
|
|
|
|||
|
|
@ -436,8 +436,6 @@ fn adjust_clip_mask(
|
|||
}
|
||||
|
||||
impl iced_graphics::Backend for Backend {
|
||||
type Geometry = ();
|
||||
|
||||
fn trim_measurements(&mut self) {
|
||||
self.text_pipeline.trim_measurement_cache();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use crate::{Point, Primitive, Rectangle, Size, Vector};
|
||||
|
||||
use iced_native::widget::canvas::fill::{self, Fill};
|
||||
use iced_native::widget::canvas::stroke::{self, Stroke};
|
||||
use iced_native::widget::canvas::{Path, Style, Text};
|
||||
use iced_native::Gradient;
|
||||
use iced_graphics::geometry::fill::{self, Fill};
|
||||
use iced_graphics::geometry::stroke::{self, Stroke};
|
||||
use iced_graphics::geometry::{Path, Style, Text};
|
||||
use iced_graphics::Gradient;
|
||||
|
||||
pub struct Frame {
|
||||
size: Size,
|
||||
|
|
@ -152,7 +152,7 @@ impl Frame {
|
|||
}
|
||||
|
||||
fn convert_path(path: &Path) -> tiny_skia::Path {
|
||||
use iced_native::widget::canvas::path::lyon_path;
|
||||
use iced_graphics::geometry::path::lyon_path;
|
||||
|
||||
let mut builder = tiny_skia::PathBuilder::new();
|
||||
let mut last_point = Default::default();
|
||||
|
|
@ -4,8 +4,8 @@ mod backend;
|
|||
mod settings;
|
||||
mod text;
|
||||
|
||||
#[cfg(feature = "canvas")]
|
||||
pub mod canvas;
|
||||
#[cfg(feature = "geometry")]
|
||||
pub mod geometry;
|
||||
|
||||
pub use iced_graphics::primitive;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue