HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleblaze-svg-0.3.7Haskell2010

Text.Blaze.Svg.Internal

Synopsis
  • Packageblaze-svg-0.3.7
  • Exports32
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs

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
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)

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

Quadratic Bezier curve (relative)

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)