From bc259dbe01ff91a5e469128beaee52a5da761b7c Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 26 Nov 2022 15:22:23 -0500 Subject: [PATCH] fix(lines): convert f32 to u8 colors correctly --- src/nodes/drawable/lines.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodes/drawable/lines.rs b/src/nodes/drawable/lines.rs index 7d236a8..919a439 100644 --- a/src/nodes/drawable/lines.rs +++ b/src/nodes/drawable/lines.rs @@ -61,7 +61,7 @@ impl Lines { .map(|p| SkLinePoint { point: transform_mat.transform_point3a(Vec3A::from(p.point)).into(), thickness: p.thickness, - color: Color32::from_slice(p.color.map(|c| (c / 255.0) as u8).as_slice()), + color: Color32::from_slice(p.color.map(|c| (c * 255.0) as u8).as_slice()), }) .collect(); if data.cyclic && !points.is_empty() {