creativescala / doodle

Compositional vector graphics in Scala / Scala.JS
https://creativescala.org/doodle/
Apache License 2.0
327 stars 75 forks source link

Add margin support to Image #127

Closed danielost closed 1 year ago

danielost commented 1 year ago

Added margin support to Image (Issue #122)

Here is the example itself, but with the Picture replaced by Image:

val circle = Image.circle(50)
val rollingCircles =
  circle
    .margin(25)
    .debug
    .beside(circle.margin(15).debug)
    .beside(circle.debug)
    .beside(circle.margin(-15).debug)
    .beside(circle.margin(-25).debug)

And here is the result: photo_2023-03-24_16-30-41

This is my very first PR, so please let me know if I did something in the wrong way

noelwelsh commented 1 year ago

Thanks for doing this! Looks great.

CI has been tripped up by formatting. I'll merge as is and fix it up myself, and update the README with instructions on running formatting etc.

danielost commented 1 year ago

Glad to help! And thanks for updating the instructions.