Merge branch 'master' into feature/custom-styling

This commit is contained in:
Héctor Ramón Jiménez 2020-01-05 22:03:32 +01:00
commit bbc8f837d7
20 changed files with 818 additions and 9 deletions

View file

@ -3,6 +3,9 @@ use iced_native::{
Vector, VerticalAlignment,
};
use crate::triangle;
use std::sync::Arc;
/// A rendering primitive.
#[derive(Debug, Clone)]
pub enum Primitive {
@ -67,6 +70,10 @@ pub enum Primitive {
/// The content of the clip
content: Box<Primitive>,
},
/// 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 {