Diagrams user API
- type Point = (Double, Double)
- (*.) :: Double -> Point -> Point
- (.*.) :: Point -> Point -> Point
- (.+.) :: Point -> Point -> Point
- (.-.) :: Point -> Point -> Point
- data Color
- color :: String -> Color
- rgb :: Double -> Double -> Double -> Color
- red :: Color
- green :: Color
- blue :: Color
- black :: Color
- white :: Color
- gray :: Color
- yellow :: Color
- data Diagram
- empty :: Diagram
- rect :: Double -> Double -> Diagram
- rectangle :: Point -> Point -> Diagram
- circle :: Double -> Diagram
- (>-<) :: Point -> Point -> Diagram
- (~~) :: Point -> Point -> Diagram
- polyline :: [Point] -> Diagram
- polygon :: [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
- union :: [Diagram] -> Diagram
- (<|>) :: Diagram -> 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