Closed FayCarsons closed 5 months ago
Thanks! This looks great!
I have suggested some renaming and refactor changes. Please go through the review.
Applied changes, caught a couple of small issues, and added color mapping functions: map_color
which applies a fn to both stroke and fill, and map_stroke
/map_fill
which apply a fn to specific color fields in a shape.
Fixed merge conflicts!
My first attempt at a system for coloring shapes and setting background in
init
. Shapes now have acolor
field that is an 8bit RGB three-tuple. Shape constructors are the same, inserting black as default, but shapes can be piped to a new functionwith_color
that returns a new shape with the color field set to the arg.So creating a gray circle can look like this: