| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | byorgey@gmail.com |
Graphics.Rendering.Diagrams.Attributes
Description
- defaultAttributes :: Diagram -> Diagram
- fillColor :: Color c => c -> Diagram -> Diagram
- fc :: Color c => c -> Diagram -> Diagram
- lineColor :: Color c => c -> Diagram -> Diagram
- lc :: Color c => c -> Diagram -> Diagram
- lineWidth :: Double -> Diagram -> Diagram
- lw :: Double -> Diagram -> Diagram
- lineCap :: LineCap -> Diagram -> Diagram
- data LineCap
- lineJoin :: LineJoin -> Diagram -> Diagram
- data LineJoin
- dashing :: [Double] -> Double -> Diagram -> Diagram
- typeface :: String -> Diagram -> Diagram
- tf :: String -> Diagram -> Diagram
- stretch :: Double -> Double -> Diagram -> Diagram
- scale :: Double -> Diagram -> Diagram
- scaleX :: Double -> Diagram -> Diagram
- scaleY :: Double -> Diagram -> Diagram
- translate :: Double -> Double -> Diagram -> Diagram
- translateX :: Double -> Diagram -> Diagram
- translateY :: Double -> Diagram -> Diagram
- rotate :: Double -> Diagram -> Diagram
- rotateR :: Double -> Diagram -> Diagram
Documentation
defaultAttributes :: Diagram -> DiagramSource
Apply all the default attributes to a Diagram.
fillColor :: Color c => c -> Diagram -> DiagramSource
Draw a diagram using the given fill color. Note that the new color only applies to parts of the diagram which are not otherwise colored; subdiagrams which already have an explicit fill color will not be affected. The default fill color is completely transparent.
lineColor :: Color c => c -> Diagram -> DiagramSource
Draw a diagram using the given color for lines. Note that the new color only applies to parts of the diagram which are not otherwise colored; subdiagrams which already have an explicit line color will not be affected. The default line color is black.
lineWidth :: Double -> Diagram -> DiagramSource
Draw shape outlines and lines with the given width. Note that the line width is invariant under uniform scaling, although under non-uniform scaling (scaling by different amounts in the x and y axes) lines can become distorted. The default line width is 1.
lineCap :: LineCap -> Diagram -> DiagramSource
Set the line cap style. Valid values for LineCap are
LineCapButt, LineCapRound, and LineCapSquare.
data LineCap
Specify line endings.
LineCapButt- Start(stop) the line exactly at the start(end) point.
LineCapRound- Use a round ending, the center of the circle is the end point.
LineCapSquare- Use squared ending, the center of the square is the end point
Constructors
| LineCapButt | |
| LineCapRound | |
| LineCapSquare |
lineJoin :: LineJoin -> Diagram -> DiagramSource
Set the line join style. Valid values for LineJoin are
LineJoinMiter, LineJoinRound, and LineJoinBevel.
Arguments
| :: [Double] | a list specifying alternate lengths of on and off portions of the stroke. The empty list indicates no dashing. |
| -> Double | an offset into the dash pattern at which the stroke should start |
| -> Diagram | |
| -> Diagram |
Set the line dashing pattern.
stretch :: Double -> Double -> Diagram -> DiagramSource
Stretch a diagram by a separate scaling factor for each axis.
stretch w h scales by a factor of w in the x direction and
a factor of h in the y direction.
scale :: Double -> Diagram -> DiagramSource
Scale by the same scaling factor in both dimensions, so the diagram retains its aspect ratio.
scaleX :: Double -> Diagram -> DiagramSource
Scale a diagram along the x-axis only. scaleX s is equivalent
to stretch s 1.
scaleY :: Double -> Diagram -> DiagramSource
Scale a diagram along the y-axis only. scaleY s is equivalent
to stretch 1 s.
translate :: Double -> Double -> Diagram -> DiagramSource
Translate a diagram by the given relative offsets in the x and y directions. Note that the positive x-axis is to the right, while the positive y-axis points downwards.
translateX :: Double -> Diagram -> DiagramSource
Translate a diagram along the x-axis only. translateX x is
equivalent to translate x 0.
translateY :: Double -> Diagram -> DiagramSource
Translate a diagram along the y-axis only. translateY y is
equivalent to translate 0 y.