Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Picture
- = Blank
- | Polygon Path
- | Line Path
- | Circle Double
- | Arc Double Double Double
- | Rectangle Double Double
- | Stroke Color Double Picture
- | Text String Font FontSize
- | Image Location Double Double
- | FillColor Color Picture
- | Translate Double Double Picture
- | Rotate Double Picture
- | Scale Double Double Picture
- | Pictures [Picture]
- type Point = (Double, Double)
- type Vector = Point
- type Path = [Point]
- data Location
- lineLoop :: Path -> Picture
- sectorWire :: Double -> Double -> Double -> Picture
- rectanglePath :: Double -> Double -> Path
- rectangleWire :: Double -> Double -> Picture
- rectangleSolid :: Double -> Double -> Picture
Documentation
A 2D picture
Blank | A blank picture, with nothing in it. |
Polygon Path | A convex polygon filled with a solid color. |
Line Path | A line along an arbitrary path. |
Circle Double | A circle with the given radius. |
Arc Double Double Double | A circular arc drawn counter-clockwise between two angles (in degrees) at the given radius. |
Rectangle Double Double | A rectangle drawn with given width and height. |
Stroke Color Double Picture | A picture drawn with this stroke, given a color and size. |
Text String Font FontSize | Some text to draw with a vector font. |
Image Location Double Double | Image to draw from a certain with given width and height. |
FillColor Color Picture | A picture drawn with this color. |
Translate Double Double Picture | A picture translated by the given x and y coordinates. |
Rotate Double Picture | A picture rotated clockwise by the given angle (in degrees). |
Scale Double Double Picture | A picture scaled by the given x and y factors. |
Pictures [Picture] | A picture consisting of several others. |
An image location
Compound shapes
sectorWire :: Double -> Double -> Double -> Picture Source #
A wireframe sector of a circle. An arc is draw counter-clockwise from the first to the second angle at the given radius.
:: Double | width of rectangle |
-> Double | height of rectangle |
-> Path |
A path representing a rectangle centered about the origin
rectangleWire :: Double -> Double -> Picture Source #
A wireframe rectangle centered about the origin.
:: Double | width of rectangle |
-> Double | height of rectangle |
-> Picture |
A solid rectangle centered about the origin.