Safe Haskell | None |
---|

- type Svg = Markup
- type Path = State AttributeValue ()
- mkPath :: Path -> AttributeValue
- m :: Show a => a -> a -> Path
- mr :: Show a => a -> a -> Path
- z :: Path
- l :: Show a => a -> a -> Path
- lr :: Show a => a -> a -> Path
- h :: Show a => a -> Path
- hr :: Show a => a -> Path
- v :: Show a => a -> Path
- vr :: Show a => a -> Path
- c :: Show a => a -> a -> a -> a -> a -> a -> Path
- cr :: Show a => a -> a -> a -> a -> a -> a -> Path
- s :: Show a => a -> a -> a -> a -> Path
- sr :: Show a => a -> a -> a -> a -> Path
- q :: Show a => a -> a -> a -> a -> Path
- qr :: Show a => a -> a -> a -> a -> Path
- t :: Show a => a -> a -> Path
- tr :: Show a => a -> a -> Path
- translate :: Show a => a -> a -> AttributeValue
- rotate :: Show a => a -> AttributeValue
- rotateAround :: Show a => a -> a -> a -> AttributeValue
- scale :: Show a => a -> a -> AttributeValue
- skewX :: Show a => a -> AttributeValue
- skewY :: Show a => a -> AttributeValue
- matrix :: Show a => a -> a -> a -> a -> a -> a -> AttributeValue

# Documentation

type Path = State AttributeValue ()Source

Type to accumulate an SVG path.

# SVG Path combinators

mkPath :: Path -> AttributeValueSource

Construct SVG path values using path instruction combinators.
See simple example below of how you can use `mkPath`

to
specify a path using the path instruction combinators
that are included as part of the same module.

More information available at: http://www.w3.org/TR/SVG/paths.html

import Text.Blaze.Svg11 ((!), mkPath, l, m) import qualified Text.Blaze.Svg11 as S import qualified Text.Blaze.Svg11.Attributes as A svgDoc :: S.Svg svgDoc = S.docTypeSvg ! A.version "1.1" ! A.width "150" ! A.height "100" $ do S.path ! A.d makeSimplePath makeSimplePath :: S.AttributeValue makeSimplePath = mkPath do l 2 3 m 4 5

## "moveto" commands

## "closepath" command

## "lineto" commands

## The cubic Bézier curve commands

## The quadratic Bézier curve commands

# SVG Transform combinators

translate :: Show a => a -> a -> AttributeValueSource

Specifies a translation by `x`

and `y`

rotate :: Show a => a -> AttributeValueSource

Specifies a rotation by `rotate-angle`

degrees

rotateAround :: Show a => a -> a -> a -> AttributeValueSource

Specifies a rotation by `rotate-angle`

degrees about the given time `rx,ry`

scale :: Show a => a -> a -> AttributeValueSource

Specifies a scale operation by `x`

and `y`

skewX :: Show a => a -> AttributeValueSource

Skew tansformation along x-axis

skewY :: Show a => a -> AttributeValueSource

Skew tansformation along y-axis

matrix :: Show a => a -> a -> a -> a -> a -> a -> AttributeValueSource

Specifies a transform in the form of a transformation matrix