Safe Haskell | Safe-Infered |
---|
Diagrams user API
- type Point = (Double, Double)
- (*.) :: Double -> Point -> Point
- (.+.), (.*.), (.-.) :: Point -> Point -> Point
- data Color
- color :: String -> Color
- rgb :: Double -> Double -> Double -> Color
- red, yellow, gray, white, black, blue, green :: Color
- data Diagram
- empty :: Diagram
- rect :: Double -> Double -> Diagram
- rectangle :: Point -> Point -> Diagram
- circle :: Double -> Diagram
- (>-<), (~~) :: Point -> Point -> Diagram
- polygon, polyline :: [Point] -> Diagram
- textFrom :: String -> Point -> Diagram
- textTo :: String -> Point -> Diagram
- textAt :: String -> Point -> Diagram
- move :: Diagram -> Point -> Diagram
- rotate :: Diagram -> Double -> Diagram
- scale :: Diagram -> Double -> Diagram
- scaleXY :: Diagram -> (Double, Double) -> Diagram
- clip :: Point -> Point -> Diagram -> Diagram
- fill :: Diagram -> Color -> Diagram
- stroke :: Diagram -> Color -> Diagram
- strokeWidth :: Diagram -> Double -> Diagram
- fontFamily :: Diagram -> String -> Diagram
- link :: Diagram -> String -> Diagram
- (<|>) :: Diagram -> Diagram -> Diagram
- union :: [Diagram] -> Diagram
- pack :: Diagram -> (Diagram -> Diagram) -> Diagram
Points
(.+.), (.*.), (.-.) :: Point -> Point -> PointSource
Elementwise addition, subtraction and multiplication for Point
s.
Colors
Diagrams
Primitives
Texts
Transformations
clip :: Point -> Point -> Diagram -> DiagramSource
clip a rectangle region (give lower-left and upper-right corners)
Styles
strokeWidth :: Diagram -> Double -> DiagramSource
set stroke width
fontFamily :: Diagram -> String -> DiagramSource
set font family