This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

🚸 Expose naked color enum variants in the crate "preamble"

+6 -7
+4 -5
examples/dna-analysis-machine/src/main.rs
··· 17 17 cyan: "#4fecec".into(), 18 18 }); 19 19 canvas.set_grid_size(16, 9); 20 - canvas.set_background(Color::Black); 20 + canvas.set_background(Black); 21 21 22 22 let draw_in = canvas.world_region.resized(-2, -2); 23 23 ··· 30 30 canvas.n_random_curves_within(&mut rand::rng(), &strands_in, 30, "strands"); 31 31 32 32 for (i, obj) in canvas.layer("strands").objects.values_mut().enumerate() { 33 - obj.recolor(if i % 2 == 0 { Color::Cyan } else { Color::Pink }); 33 + obj.recolor(if i % 2 == 0 { Cyan } else { Pink }); 34 34 obj.filter(Filter::glow(4.0)); 35 35 } 36 36 ··· 41 41 .unwrap() 42 42 .random_point(&mut rand::rng()), 43 43 ) 44 - .colored(Color::Red) 44 + .colored(Red) 45 45 .filtered(Filter::glow(5.0)); 46 46 47 47 canvas.new_layer("red dot").add(red_dot.clone()); ··· 59 59 } else { 60 60 Object::Rectangle(point, point) 61 61 } 62 - .filled(Fill::Hatches( 63 - Color::White, 62 + .filled(White.hatches( 64 63 Angle::from_degrees(45.0), 65 64 (i + 5) as f32 / 10.0, 66 65 0.25,
+2 -2
src/lib.rs
··· 31 31 32 32 pub use geometry::{Angle, Axis, Containable, Point, Region}; 33 33 pub use graphics::{ 34 - Canvas, Color, ColorMapping, ColoredObject, Fill, Filter, FilterType, Layer, 35 - LineSegment, Object, ObjectSizes, Transformation, 34 + Canvas, Color, Color::*, ColorMapping, ColoredObject, Fill, Filter, 35 + FilterType, Layer, LineSegment, Object, ObjectSizes, Transformation, 36 36 }; 37 37 pub use rendering::{ 38 38 fonts, CSSRenderable, SVGAttributesRenderable, SVGRenderable,