Safe Haskell | None |
---|
- data Element
- image :: Int -> Int -> FilePath -> Element
- croppedImage :: (Int, Int) -> Int -> Int -> FilePath -> Element
- data Form = Form {}
- data FillStyle
- data LineCap
- data LineJoin
- data LineStyle = LineStyle {}
- defaultLine :: LineStyle
- solid :: Color -> LineStyle
- dashed :: Color -> LineStyle
- dotted :: Color -> LineStyle
- data FormStyle
- filled :: Color -> Shape -> Form
- textured :: String -> Shape -> Form
- gradient :: Gradient -> Shape -> Form
- outlined :: LineStyle -> Shape -> Form
- traced :: LineStyle -> Path -> Form
- sprite :: Int -> Int -> (Int, Int) -> FilePath -> Form
- toForm :: Element -> Form
- group :: [Form] -> Form
- groupTransform :: Matrix -> [Form] -> Form
- rotate :: Double -> Form -> Form
- scale :: Double -> Form -> Form
- move :: (Double, Double) -> Form -> Form
- moveX :: Double -> Form -> Form
- moveY :: Double -> Form -> Form
- collage :: Int -> Int -> [Form] -> Element
- type Path = [(Double, Double)]
- path :: [(Double, Double)] -> Path
- segment :: (Double, Double) -> (Double, Double) -> Path
- type Shape = [(Double, Double)]
- polygon :: [(Double, Double)] -> Shape
- rect :: Double -> Double -> Shape
- square :: Double -> Shape
- oval :: Double -> Double -> Shape
- circle :: Double -> Shape
- ngon :: Int -> Double -> Shape
Documentation
image :: Int -> Int -> FilePath -> ElementSource
Create an element from an image with a given width, height and image file path. If the image dimensions are not the same as given, then it will stretch/shrink to fit. Only PNG files are supported currently.
croppedImage :: (Int, Int) -> Int -> Int -> FilePath -> ElementSource
Create an element from an image by cropping it with a certain position, width, height and image file path. This can be used to divide a single image up into smaller ones.
defaultLine :: LineStyleSource
Creates the default line style. By default, the line is black with a width of 1, flat caps and regular sharp joints.
filled :: Color -> Shape -> FormSource
Creates a form from a shape by filling it with a specific color.
textured :: String -> Shape -> FormSource
Creates a form from a shape with a tiled texture and image file path.
outlined :: LineStyle -> Shape -> FormSource
Creates a form from a shape by outlining it with a specific line style.
traced :: LineStyle -> Path -> FormSource
Creates a form from a path by tracing it with a specific line style.
sprite :: Int -> Int -> (Int, Int) -> FilePath -> FormSource
Creates a form from a image file path with additional position, width and height arguments. Allows you to splice smaller parts from a single image.
groupTransform :: Matrix -> [Form] -> FormSource
Groups a collection of forms into a single one, also applying a matrix transformation.
scale :: Double -> Form -> FormSource
Scales a form by an amount, e.g. scaling by 2 will double the size.
collage :: Int -> Int -> [Form] -> ElementSource
Create an element from a collection of forms. Can be used to directly render a collection of forms.
segment :: (Double, Double) -> (Double, Double) -> PathSource
Creates a path from a line segment, i.e. a start and end point.