Type to represent an SVG document fragment.
Moduleblaze-svg-0.3.7Haskell2010
Text.Blaze.Svg.Internal
- 2 types
- 30 values
- Packageblaze-svg-0.3.7
- Exports32
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceInternal.hs
Type to accumulate an SVG path.
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 5Moveto
Moveto (relative)
ClosePath
Lineto
Lineto (relative)
Horizontal lineto
Horizontal lineto (relative)
Vertical lineto
Vertical lineto (relative)
Cubic Bezier curve
Cubic Bezier curve (relative)
Smooth Cubic Bezier curve
Smooth Cubic Bezier curve (relative)
Quadratic Bezier curve
Quadratic Bezier curve (relative)
Smooth Quadratic Bezier curve
Smooth Quadratic Bezier curve (relative)
aa :: Show a=> aRadius in the x-direction
-> aRadius in the y-direction
-> aThe rotation of the arc's x-axis compared to the normal x-axis
-> BoolDraw the smaller or bigger arc satisfying the start point
-> BoolTo mirror or not
-> aThe x-coordinate of the end point
-> aThe y-coordinate of the end point
-> Path
Elliptical Arc (absolute).
Note that this function is an alias for the function
a, defined in
Text.Blaze.Svg.Internal. aa is exported from Text.Blaze.Svg
instead of a due to naming conflicts with a
from Text.Blaze.SVG11.
a :: Show a=> aRadius in the x-direction
-> aRadius in the y-direction
-> aThe rotation of the arc's x-axis compared to the normal x-axis
-> BoolTrue to draw the larger of the two arcs satisfying constraints.
-> BoolTo mirror or not
-> aThe x-coordinate of the end point
-> aThe y-coordinate of the end point
-> Path
Elliptical Arc (absolute). This is the internal definition for absolute
arcs. It is not exported but instead exported as aa due to naming
conflicts with Text.Blaze.SVG11.a.
ar :: Show a=> aRadius in the x-direction
-> aRadius in the y-direction
-> aThe rotation of the arc's x-axis compared to the normal x-axis
-> BoolTrue to draw the larger of the two arcs satisfying constraints.
-> BoolTo mirror or not
-> aThe x-coordinate of the end point
-> aThe y-coordinate of the end point
-> Path
Elliptical Arc (relative)
Specifies a translation by x and y
Specifies a scale operation by x and y
Specifies a rotation by rotate-angle degrees
Specifies a rotation by rotate-angle degrees about the given time rx,ry
Skew tansformation along x-axis
Skew tansformation along y-axis
Specifies a transform in the form of a transformation matrix