From e835cea03c5d6eeba2d76b52206516dcc2a6b628 Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Thu, 27 Jan 2022 09:40:52 -0800 Subject: Add line dash API --- examples/solar_system/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/solar_system/src/main.rs') diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index 5f9724f3..0e7da97f 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -163,6 +163,10 @@ impl canvas::Program for State { Stroke { width: 1.0, color: Color::from_rgba8(0, 153, 255, 0.1), + line_dash: canvas::LineDash { + offset: 0, + segments: vec![6.0, 3.0], + }, ..Stroke::default() }, ); -- cgit From 39800b445f135211504b18bbc03ab9840198a64f Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Thu, 27 Jan 2022 10:01:16 -0800 Subject: Increase gap in example --- examples/solar_system/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/solar_system/src/main.rs') diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index 0e7da97f..fb782d9c 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -165,7 +165,7 @@ impl canvas::Program for State { color: Color::from_rgba8(0, 153, 255, 0.1), line_dash: canvas::LineDash { offset: 0, - segments: vec![6.0, 3.0], + segments: vec![3.0, 6.0], }, ..Stroke::default() }, -- cgit From f56c8a7361ceb215bce68e88bd6ce402e2694693 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 3 Feb 2022 17:18:05 +0700 Subject: Ask for a slice of segments instead of ownership in `LineDash` --- examples/solar_system/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/solar_system/src/main.rs') diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index fb782d9c..12184dd1 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -165,7 +165,7 @@ impl canvas::Program for State { color: Color::from_rgba8(0, 153, 255, 0.1), line_dash: canvas::LineDash { offset: 0, - segments: vec![3.0, 6.0], + segments: &[3.0, 6.0], }, ..Stroke::default() }, -- cgit