Rename Geometry2D to Mesh2D and move it to iced_wgpu
This commit is contained in:
parent
0d620b7701
commit
5ca98b113e
12 changed files with 184 additions and 198 deletions
|
|
@ -1,8 +1,11 @@
|
|||
use iced_native::{
|
||||
image, svg, Background, Color, Font, HorizontalAlignment, Rectangle,
|
||||
Vector, VerticalAlignment, Geometry2D,
|
||||
Vector, VerticalAlignment,
|
||||
};
|
||||
|
||||
use crate::triangle;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A rendering primitive.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Primitive {
|
||||
|
|
@ -63,11 +66,10 @@ pub enum Primitive {
|
|||
/// The content of the clip
|
||||
content: Box<Primitive>,
|
||||
},
|
||||
/// A low-level geometry primitive
|
||||
Geometry2D {
|
||||
/// The vertices and indices of the geometry
|
||||
geometry: Geometry2D,
|
||||
},
|
||||
/// A low-level primitive to render a mesh of triangles.
|
||||
///
|
||||
/// It can be used to render many kinds of geometry freely.
|
||||
Mesh2D(Arc<triangle::Mesh2D>),
|
||||
}
|
||||
|
||||
impl Default for Primitive {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue