Skip to content

A Haskell (Scotty) HTTP service to generate SVG shapes

License

Notifications You must be signed in to change notification settings

houli/shape-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shape Server

img/demo.gif

Building

$ stack setup && stack build

Running

$ stack exec shape-server

You will be able to access the server at http://localhost:3000

Supported shapes, transforms, colours and styles

Some example JSON data has already been provided on the main page to get started. The following is a list of all supported data

Shapes

  • square
  • circle

Transforms (all parameters are JSON numbers)

  • translate with parameters x and y
  • scale with parameters x and y
  • rotate with parameter angle
  • skewX with parameter angle
  • skewY with parameter angle

Colours

  • white
  • silver
  • gray
  • black
  • red
  • maroon
  • yellow
  • olive
  • lime
  • green
  • aqua
  • teal
  • blue
  • navy
  • fuchsia
  • purple
  • Custom hex colours of the form #d8d836 etc.

Styles

  • strokeWidth which takes a number
  • stroke which takes a colour string
  • fill which takes a colour string

Releases

No releases published

Packages

No packages published