Portability | portable |
---|---|
Stability | experimental |
Maintainer | byorgey@gmail.com |
Safe Haskell | None |
- fillColor :: Color -> Diagram -> Diagram
- fc :: Color -> Diagram -> Diagram
- fillTransparency :: Int -> Diagram -> Diagram
- ft :: Int -> Diagram -> Diagram
- lineColor :: Color -> Diagram -> Diagram
- lc :: Color -> Diagram -> Diagram
- lineWidth :: Double -> Diagram -> Diagram
- lw :: Double -> 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
fillColor :: Color -> 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.
fillTransparency :: Int -> Diagram -> DiagramSource
Set the transparency used for the fill color, from 0 (completely
transparent) to 255 (completely opaque). Note that you can set
the alpha channel of the fill color using fillColor
combined
with rgba
, but fillTransparency
allows you to set the alpha
channel independently of the color channels. This means you can
use it together with the colors defined in
Graphics.Rendering.Diagrams.Colors.
ft :: Int -> Diagram -> DiagramSource
ft
is provided as a convenient short synonym for fillTransparency
.
lineColor :: Color -> 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.
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
.