diff options
| author | 2020-03-09 00:48:51 +0100 | |
|---|---|---|
| committer | 2020-03-09 00:48:51 +0100 | |
| commit | 5a91b52ef4066701d82a897b44a3f90412f210d2 (patch) | |
| tree | 13d58d144c3ddf05e44c72557bf2af2194207bf3 /wgpu/src/widget/canvas/layer.rs | |
| parent | 29219500b7144f31dbf50fcc64653f7d2ce806d0 (diff) | |
| parent | b4f970ee7317297615848cd12f422c0cd2889f60 (diff) | |
| download | iced-5a91b52ef4066701d82a897b44a3f90412f210d2.tar.gz iced-5a91b52ef4066701d82a897b44a3f90412f210d2.tar.bz2 iced-5a91b52ef4066701d82a897b44a3f90412f210d2.zip | |
Merge pull request #214 from artursapek/artur/canvas-text
Implement text support in canvas widget
Diffstat (limited to 'wgpu/src/widget/canvas/layer.rs')
| -rw-r--r-- | wgpu/src/widget/canvas/layer.rs | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/wgpu/src/widget/canvas/layer.rs b/wgpu/src/widget/canvas/layer.rs index 82d647bb..a46b7fb1 100644 --- a/wgpu/src/widget/canvas/layer.rs +++ b/wgpu/src/widget/canvas/layer.rs @@ -3,23 +3,23 @@ mod cache;  pub use cache::Cache; -use crate::triangle; - +use crate::Primitive;  use iced_native::Size; +  use std::sync::Arc;  /// A layer that can be presented at a [`Canvas`].  ///  /// [`Canvas`]: ../struct.Canvas.html  pub trait Layer: std::fmt::Debug { -    /// Draws the [`Layer`] in the given bounds and produces [`Mesh2D`] as a -    /// result. +    /// Draws the [`Layer`] in the given bounds and produces a [`Primitive`] as +    /// a result.      /// -    /// The [`Layer`] may choose to store the produced [`Mesh2D`] locally and +    /// The [`Layer`] may choose to store the produced [`Primitive`] locally and      /// only recompute it when the bounds change, its contents change, or is      /// otherwise explicitly cleared by other means.      ///      /// [`Layer`]: trait.Layer.html -    /// [`Mesh2D`]: ../../../triangle/struct.Mesh2D.html -    fn draw(&self, bounds: Size) -> Arc<triangle::Mesh2D>; +    /// [`Primitive`]: ../../../enum.Primitive.html +    fn draw(&self, bounds: Size) -> Arc<Primitive>;  } | 
