Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A ‘shape’ drawing
Shape.clear()
def r(w: Int, h: Int) = Shape.rectangle(w, h) .outlined(black)
def sq(l: Int) = r(l, l)
def vgap(l: Int) = Shape.gap(0, l)
def hgap(l: Int) = Shape.gap(l, 0)
val eyes = sq(50) beside hgap(100) beside sq(50) filled(lightGray)
val nose = r(30, 100) .filled(orange)
val mouth = r(100, 20) .filled(red)
val face = eyes above
vgap(10) above
nose above
vgap(30) above
mouth on
sq(350)
Shape.draw(face)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment