summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-03-09 00:48:51 +0100
committerLibravatar GitHub <noreply@github.com>2020-03-09 00:48:51 +0100
commit5a91b52ef4066701d82a897b44a3f90412f210d2 (patch)
tree13d58d144c3ddf05e44c72557bf2af2194207bf3 /examples
parent29219500b7144f31dbf50fcc64653f7d2ce806d0 (diff)
parentb4f970ee7317297615848cd12f422c0cd2889f60 (diff)
downloadiced-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 'examples')
-rw-r--r--examples/bezier_tool/src/main.rs5
-rw-r--r--examples/geometry/src/main.rs4
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs
index 023eb0f7..c3fbf276 100644
--- a/examples/bezier_tool/src/main.rs
+++ b/examples/bezier_tool/src/main.rs
@@ -23,7 +23,6 @@ mod bezier {
basic_shapes, BuffersBuilder, StrokeAttributes, StrokeOptions,
StrokeTessellator, VertexBuffers,
};
- use std::sync::Arc;
pub struct Bezier<'a, Message> {
state: &'a mut State,
@@ -175,10 +174,10 @@ mod bezier {
let mesh = Primitive::Mesh2D {
origin: Point::new(bounds.x, bounds.y),
- buffers: Arc::new(Mesh2D {
+ buffers: Mesh2D {
vertices: buffer.vertices,
indices: buffer.indices,
- }),
+ },
};
(
diff --git a/examples/geometry/src/main.rs b/examples/geometry/src/main.rs
index 795c6a71..13a687ab 100644
--- a/examples/geometry/src/main.rs
+++ b/examples/geometry/src/main.rs
@@ -87,7 +87,7 @@ mod rainbow {
(
Primitive::Mesh2D {
origin: Point::new(b.x, b.y),
- buffers: std::sync::Arc::new(Mesh2D {
+ buffers: Mesh2D {
vertices: vec![
Vertex2D {
position: posn_center,
@@ -136,7 +136,7 @@ mod rainbow {
0, 7, 8, // BL
0, 8, 1, // L
],
- }),
+ },
},
MouseCursor::OutOfBounds,
)