Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A ‘shape’ drawing
def r(w: Int, h: Int) = Shape.rectangle(w, h) .outlined(black)
def sq(l: Int) = r(l, l)
def vgap(l: Int) =, l)
def hgap(l: Int) =, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment