Skip to content

Instantly share code, notes, and snippets.

@uehaj
Created September 27, 2014 14:49
Show Gist options
  • Save uehaj/602358867b008fb420da to your computer and use it in GitHub Desktop.
Save uehaj/602358867b008fb420da to your computer and use it in GitHub Desktop.
import Window
thickLine = { defaultLine | width <- 20 }
roundLine = { thickLine | cap <- Round }
smoothLine = { thickLine | join <- Clipped, cap <-Round }
main = let
disp w h = collage w h
[ move (-100,250) <| outlined thickLine <| ngon 5 100
, move (-100,250) <| outlined thickLine <| polygon [(200, 0),(250,100),(150,100)]
, move (-100,0) <| outlined roundLine <| ngon 5 100
, move (-100,0) <| outlined roundLine <| polygon [(200, 0),(250,100),(150,100)]
, move (-100,-250) <| outlined smoothLine <| ngon 5 100
, move (-100,-250) <| outlined smoothLine <| polygon [(200, 0),(250,100),(150,100)]
]
in disp <~ Window.width ~ Window.height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment