HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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
typetype Svg = Markup
#

Type to represent an SVG document fragment.

valuemkPath :: Path -> AttributeValue
#

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
valuemr :: Show a => a -> a -> Path
#

Moveto (relative)

valuelr :: Show a => a -> a -> Path
#

Lineto (relative)

valueh :: Show a => a -> Path
#

Horizontal lineto

valuehr :: Show a => a -> Path
#

Horizontal lineto (relative)

valuev :: Show a => a -> Path
#

Vertical lineto

valuevr :: Show a => a -> Path
#

Vertical lineto (relative)

valuec :: Show a => a -> a -> a -> a -> a -> a -> Path
#

Cubic Bezier curve

valuecr :: Show a => a -> a -> a -> a -> a -> a -> Path
#

Cubic Bezier curve (relative)

values :: Show a => a -> a -> a -> a -> Path
#

Smooth Cubic Bezier curve

valuesr :: Show a => a -> a -> a -> a -> Path
#

Smooth Cubic Bezier curve (relative)

valueq :: Show a => a -> a -> a -> a -> Path
#

Quadratic Bezier curve

valueqr :: Show a => a -> a -> a -> a -> Path
#

Quadratic Bezier curve (relative)

valuet :: Show a => a -> a -> Path
#

Smooth Quadratic Bezier curve

valuetr :: Show a => a -> a -> Path
#

Smooth Quadratic Bezier curve (relative)

valueaa
  1. :: Show a
  2. => a

    Radius in the x-direction

  3. -> a

    Radius in the y-direction

  4. -> a

    The rotation of the arc's x-axis compared to the normal x-axis

  5. -> Bool

    Draw the smaller or bigger arc satisfying the start point

  6. -> Bool

    To mirror or not

  7. -> a

    The x-coordinate of the end point

  8. -> a

    The y-coordinate of the end point

  9. -> 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.

valuea
  1. :: Show a
  2. => a

    Radius in the x-direction

  3. -> a

    Radius in the y-direction

  4. -> a

    The rotation of the arc's x-axis compared to the normal x-axis

  5. -> Bool

    True to draw the larger of the two arcs satisfying constraints.

  6. -> Bool

    To mirror or not

  7. -> a

    The x-coordinate of the end point

  8. -> a

    The y-coordinate of the end point

  9. -> 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.

valuear
  1. :: Show a
  2. => a

    Radius in the x-direction

  3. -> a

    Radius in the y-direction

  4. -> a

    The rotation of the arc's x-axis compared to the normal x-axis

  5. -> Bool

    True to draw the larger of the two arcs satisfying constraints.

  6. -> Bool

    To mirror or not

  7. -> a

    The x-coordinate of the end point

  8. -> a

    The y-coordinate of the end point

  9. -> Path
#

Elliptical Arc (relative)

valuematrix :: Show a => a -> a -> a -> a -> a -> a -> AttributeValue
#

Specifies a transform in the form of a transformation matrix