Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module define all the types used in the definition of a svg scene.
Most of the types are lensified.
Synopsis
- type Coord = Double
- data Origin
- type Point = (Number, Number)
- type RPoint = V2 Coord
- data PathCommand
- = MoveTo !Origin ![RPoint]
- | LineTo !Origin ![RPoint]
- | HorizontalTo !Origin ![Coord]
- | VerticalTo !Origin ![Coord]
- | CurveTo !Origin ![(RPoint, RPoint, RPoint)]
- | SmoothCurveTo !Origin ![(RPoint, RPoint)]
- | QuadraticBezier !Origin ![(RPoint, RPoint)]
- | SmoothQuadraticBezierCurveTo !Origin ![RPoint]
- | EllipticalArc !Origin ![(Coord, Coord, Coord, Bool, Bool, RPoint)]
- | EndPath
- data Transformation
- data ElementRef
- data CoordinateUnits
- toPoint :: Number -> Number -> Point
- serializeNumber :: Number -> String
- serializeTransformation :: Transformation -> String
- serializeTransformations :: [Transformation] -> String
- data Cap
- data LineJoin
- data Tree
- = None
- | UseTree {
- useInformation :: !Use
- useSubTree :: !(Maybe Tree)
- | GroupTree !(Group Tree)
- | SymbolTree !(Symbol Tree)
- | DefinitionTree !(Definitions Tree)
- | FilterTree !Filter
- | PathTree !Path
- | CircleTree !Circle
- | PolyLineTree !PolyLine
- | PolygonTree !Polygon
- | EllipseTree !Ellipse
- | LineTree !Line
- | RectangleTree !Rectangle
- | TextTree !(Maybe TextPath) !Text
- | ImageTree !Image
- | LinearGradientTree !LinearGradient
- | RadialGradientTree !RadialGradient
- | MeshGradientTree !MeshGradient
- | PatternTree !Pattern
- | MarkerTree !Marker
- | MaskTree !Mask
- | ClipPathTree !ClipPath
- | SvgTree !Document
- data Number
- data Spread
- data Texture
- data Element
- data FillRule
- data FontStyle
- type Dpi = Int
- class WithDefaultSvg a where
- defaultSvg :: a
- data Document = Document {}
- class HasDocument c where
- documentSize :: Dpi -> Document -> (Int, Int)
- data DrawAttributes = DrawAttributes {
- _strokeWidth :: !(Last Number)
- _strokeColor :: !(Last Texture)
- _strokeOpacity :: !(Maybe Float)
- _strokeLineCap :: !(Last Cap)
- _strokeLineJoin :: !(Last LineJoin)
- _strokeMiterLimit :: !(Last Double)
- _fillColor :: !(Last Texture)
- _fillOpacity :: !(Maybe Float)
- _groupOpacity :: !(Maybe Float)
- _transform :: !(Maybe [Transformation])
- _fillRule :: !(Last FillRule)
- _maskRef :: !(Last ElementRef)
- _clipPathRef :: !(Last ElementRef)
- _clipRule :: !(Last FillRule)
- _attrClass :: ![Text]
- _attrId :: !(Maybe String)
- _strokeOffset :: !(Last Number)
- _strokeDashArray :: !(Last [Number])
- _fontSize :: !(Last Number)
- _fontFamily :: !(Last [String])
- _fontStyle :: !(Last FontStyle)
- _textAnchor :: !(Last TextAnchor)
- _markerStart :: !(Last ElementRef)
- _markerMid :: !(Last ElementRef)
- _markerEnd :: !(Last ElementRef)
- _filterRef :: !(Last ElementRef)
- _preRendered :: !(Maybe String)
- class HasDrawAttributes c where
- drawAttributes :: Lens' c DrawAttributes
- attrClass :: Lens' c [Text]
- attrId :: Lens' c (Maybe String)
- clipPathRef :: Lens' c (Last ElementRef)
- clipRule :: Lens' c (Last FillRule)
- fillColor :: Lens' c (Last Texture)
- fillOpacity :: Lens' c (Maybe Float)
- fillRule :: Lens' c (Last FillRule)
- filterRef :: Lens' c (Last ElementRef)
- fontFamily :: Lens' c (Last [String])
- fontSize :: Lens' c (Last Number)
- fontStyle :: Lens' c (Last FontStyle)
- groupOpacity :: Lens' c (Maybe Float)
- markerEnd :: Lens' c (Last ElementRef)
- markerMid :: Lens' c (Last ElementRef)
- markerStart :: Lens' c (Last ElementRef)
- maskRef :: Lens' c (Last ElementRef)
- preRendered :: Lens' c (Maybe String)
- strokeColor :: Lens' c (Last Texture)
- strokeDashArray :: Lens' c (Last [Number])
- strokeLineCap :: Lens' c (Last Cap)
- strokeLineJoin :: Lens' c (Last LineJoin)
- strokeMiterLimit :: Lens' c (Last Double)
- strokeOffset :: Lens' c (Last Number)
- strokeOpacity :: Lens' c (Maybe Float)
- strokeWidth :: Lens' c (Last Number)
- textAnchor :: Lens' c (Last TextAnchor)
- transform :: Lens' c (Maybe [Transformation])
- data FilterElement
- = FEBlend
- | FEColorMatrix ColorMatrix
- | FEComponentTransfer
- | FEComposite Composite
- | FEConvolveMatrix
- | FEDiffuseLighting
- | FEDisplacementMap DisplacementMap
- | FEDropShadow
- | FEFlood
- | FEFuncA
- | FEFuncB
- | FEFuncG
- | FEFuncR
- | FEGaussianBlur GaussianBlur
- | FEImage
- | FEMerge
- | FEMergeNode
- | FEMorphology
- | FEOffset
- | FESpecularLighting
- | FETile
- | FETurbulence Turbulence
- | FENone
- data FilterAttributes = FilterAttributes {
- _filterHeight :: !(Last Number)
- _filterResult :: !(Maybe String)
- _filterWidth :: !(Last Number)
- _filterX :: !(Last Number)
- _filterY :: !(Last Number)
- class HasFilterAttributes c_asYk where
- filterAttributes :: Lens' c_asYk FilterAttributes
- filterHeight :: Lens' c_asYk (Last Number)
- filterResult :: Lens' c_asYk (Maybe String)
- filterWidth :: Lens' c_asYk (Last Number)
- filterX :: Lens' c_asYk (Last Number)
- filterY :: Lens' c_asYk (Last Number)
- data FilterSource
- data ColorMatrixType
- class HasColorMatrix c where
- data ColorMatrix = ColorMatrix {}
- class HasComposite c where
- composite :: Lens' c Composite
- compositeDrawAttributes :: Lens' c DrawAttributes
- compositeFilterAttr :: Lens' c FilterAttributes
- compositeIn :: Lens' c (Last FilterSource)
- compositeIn2 :: Lens' c (Last FilterSource)
- compositeK1 :: Lens' c Number
- compositeK2 :: Lens' c Number
- compositeK3 :: Lens' c Number
- compositeK4 :: Lens' c Number
- compositeOperator :: Lens' c CompositeOperator
- data Composite = Composite {}
- data CompositeOperator
- data EdgeMode
- class HasGaussianBlur c where
- gaussianBlur :: Lens' c GaussianBlur
- gaussianBlurDrawAttributes :: Lens' c DrawAttributes
- gaussianBlurEdgeMode :: Lens' c EdgeMode
- gaussianBlurFilterAttr :: Lens' c FilterAttributes
- gaussianBlurIn :: Lens' c (Last FilterSource)
- gaussianBlurStdDeviationX :: Lens' c Number
- gaussianBlurStdDeviationY :: Lens' c (Last Number)
- data GaussianBlur = GaussianBlur {}
- class HasTurbulence c where
- turbulence :: Lens' c Turbulence
- turbulenceBaseFrequency :: Lens' c (Double, Last Double)
- turbulenceDrawAttributes :: Lens' c DrawAttributes
- turbulenceFilterAttr :: Lens' c FilterAttributes
- turbulenceNumOctaves :: Lens' c Int
- turbulenceSeed :: Lens' c Double
- turbulenceStitchTiles :: Lens' c StitchTiles
- turbulenceType :: Lens' c TurbulenceType
- data Turbulence = Turbulence {}
- data TurbulenceType
- data StitchTiles
- class HasDisplacementMap c where
- displacementMap :: Lens' c DisplacementMap
- displacementMapDrawAttributes :: Lens' c DrawAttributes
- displacementMapFilterAttr :: Lens' c FilterAttributes
- displacementMapIn :: Lens' c (Last FilterSource)
- displacementMapIn2 :: Lens' c (Last FilterSource)
- displacementMapScale :: Lens' c (Last Double)
- displacementMapXChannelSelector :: Lens' c ChannelSelector
- displacementMapYChannelSelector :: Lens' c ChannelSelector
- data DisplacementMap = DisplacementMap {
- _displacementMapDrawAttributes :: !DrawAttributes
- _displacementMapFilterAttr :: !FilterAttributes
- _displacementMapIn :: !(Last FilterSource)
- _displacementMapIn2 :: !(Last FilterSource)
- _displacementMapScale :: !(Last Double)
- _displacementMapXChannelSelector :: ChannelSelector
- _displacementMapYChannelSelector :: ChannelSelector
- data ChannelSelector
- data Rectangle = Rectangle {
- _rectDrawAttributes :: !DrawAttributes
- _rectUpperLeftCorner :: !Point
- _rectWidth :: !(Maybe Number)
- _rectHeight :: !(Maybe Number)
- _rectCornerRadius :: !(Maybe Number, Maybe Number)
- class HasRectangle a where
- rectangle :: Lens' a Rectangle
- rectCornerRadius :: Lens' a (Maybe Number, Maybe Number)
- rectDrawAttributes :: Lens' a DrawAttributes
- rectHeight :: Lens' a (Maybe Number)
- rectUpperLeftCorner :: Lens' a Point
- rectWidth :: Lens' a (Maybe Number)
- data Line = Line {}
- class HasLine a where
- line :: Lens' a Line
- lineDrawAttributes :: Lens' a DrawAttributes
- linePoint1 :: Lens' a Point
- linePoint2 :: Lens' a Point
- data Polygon = Polygon {}
- class HasPolygon a where
- polygon :: Lens' a Polygon
- polygonDrawAttributes :: Lens' a DrawAttributes
- polygonPoints :: Lens' a [RPoint]
- data PolyLine = PolyLine {}
- class HasPolyLine a where
- polyLine :: Lens' a PolyLine
- polyLineDrawAttributes :: Lens' a DrawAttributes
- polyLinePoints :: Lens' a [RPoint]
- data Path = Path {}
- class HasPath c_alhy where
- path :: Lens' c_alhy Path
- pathDefinition :: Lens' c_alhy [PathCommand]
- pathDrawAttributes :: Lens' c_alhy DrawAttributes
- data Circle = Circle {}
- class HasCircle a where
- circle :: Lens' a Circle
- circleCenter :: Lens' a Point
- circleDrawAttributes :: Lens' a DrawAttributes
- circleRadius :: Lens' a Number
- data Ellipse = Ellipse {}
- class HasEllipse c_amWt where
- ellipse :: Lens' c_amWt Ellipse
- ellipseCenter :: Lens' c_amWt Point
- ellipseDrawAttributes :: Lens' c_amWt DrawAttributes
- ellipseXRadius :: Lens' c_amWt Number
- ellipseYRadius :: Lens' c_amWt Number
- data GradientPathCommand
- data MeshGradientType
- data MeshGradient = MeshGradient {}
- class HasMeshGradient c_anxG where
- meshGradient :: Lens' c_anxG MeshGradient
- meshGradientDrawAttributes :: Lens' c_anxG DrawAttributes
- meshGradientRows :: Lens' c_anxG [MeshGradientRow]
- meshGradientTransform :: Lens' c_anxG [Transformation]
- meshGradientType :: Lens' c_anxG MeshGradientType
- meshGradientUnits :: Lens' c_anxG CoordinateUnits
- meshGradientX :: Lens' c_anxG Number
- meshGradientY :: Lens' c_anxG Number
- data MeshGradientRow = MeshGradientRow {}
- class HasMeshGradientRow c_antr where
- meshGradientRow :: Lens' c_antr MeshGradientRow
- meshGradientRowPatches :: Lens' c_antr [MeshGradientPatch]
- data MeshGradientPatch = MeshGradientPatch {}
- class HasMeshGradientPatch c_annx where
- meshGradientPatch :: Lens' c_annx MeshGradientPatch
- meshGradientPatchStops :: Lens' c_annx [GradientStop]
- data Image = Image {}
- class HasImage c_anI7 where
- image :: Lens' c_anI7 Image
- imageAspectRatio :: Lens' c_anI7 PreserveAspectRatio
- imageCornerUpperLeft :: Lens' c_anI7 Point
- imageDrawAttributes :: Lens' c_anI7 DrawAttributes
- imageHeight :: Lens' c_anI7 Number
- imageHref :: Lens' c_anI7 String
- imageWidth :: Lens' c_anI7 Number
- data Use = Use {}
- class HasUse c_anR3 where
- data Group a = Group {
- _groupDrawAttributes :: !DrawAttributes
- _groupChildren :: ![a]
- _groupViewBox :: !(Maybe (Double, Double, Double, Double))
- _groupAspectRatio :: !PreserveAspectRatio
- class HasGroup g a | g -> a where
- group :: Lens' g (Group a)
- groupAspectRatio :: Lens' g PreserveAspectRatio
- groupChildren :: Lens' g [a]
- groupDrawAttributes :: Lens' g DrawAttributes
- groupViewBox :: Lens' g (Maybe (Double, Double, Double, Double))
- newtype Symbol a = Symbol {
- _groupOfSymbol :: Group a
- groupOfSymbol :: Lens (Symbol s) (Symbol t) (Group s) (Group t)
- newtype Definitions a = Definitions {
- _groupOfDefinitions :: Group a
- groupOfDefinitions :: Lens (Definitions s) (Definitions t) (Group s) (Group t)
- data Filter = Filter {}
- filterChildren :: Lens' Filter [FilterElement]
- data Text = Text {
- _textAdjust :: !TextAdjust
- _textRoot :: !TextSpan
- class HasText c_aorD where
- text :: Lens' c_aorD Text
- textAdjust :: Lens' c_aorD TextAdjust
- textRoot :: Lens' c_aorD TextSpan
- data TextAnchor
- textAt :: Point -> Text -> Text
- data TextPath = TextPath {}
- class HasTextPath c where
- data TextPathSpacing
- data TextPathMethod
- data TextSpanContent
- data TextSpan = TextSpan {}
- class HasTextSpan c_aobD where
- textSpan :: Lens' c_aobD TextSpan
- spanContent :: Lens' c_aobD [TextSpanContent]
- spanDrawAttributes :: Lens' c_aobD DrawAttributes
- spanInfo :: Lens' c_aobD TextInfo
- data TextInfo = TextInfo {
- _textInfoX :: ![Number]
- _textInfoY :: ![Number]
- _textInfoDX :: ![Number]
- _textInfoDY :: ![Number]
- _textInfoRotate :: ![Double]
- _textInfoLength :: !(Maybe Number)
- class HasTextInfo c_ao0m where
- data TextAdjust
- data Marker = Marker {
- _markerDrawAttributes :: DrawAttributes
- _markerRefPoint :: !(Number, Number)
- _markerWidth :: !(Maybe Number)
- _markerHeight :: !(Maybe Number)
- _markerOrient :: !(Maybe MarkerOrientation)
- _markerUnits :: !(Maybe MarkerUnit)
- _markerViewBox :: !(Maybe (Double, Double, Double, Double))
- _markerOverflow :: !(Maybe Overflow)
- _markerAspectRatio :: !PreserveAspectRatio
- _markerElements :: [Tree]
- data Overflow
- data MarkerOrientation
- data MarkerUnit
- class HasMarker c_aoKc where
- marker :: Lens' c_aoKc Marker
- markerAspectRatio :: Lens' c_aoKc PreserveAspectRatio
- markerDrawAttributes :: Lens' c_aoKc DrawAttributes
- markerElements :: Lens' c_aoKc [Tree]
- markerHeight :: Lens' c_aoKc (Maybe Number)
- markerOrient :: Lens' c_aoKc (Maybe MarkerOrientation)
- markerOverflow :: Lens' c_aoKc (Maybe Overflow)
- markerRefPoint :: Lens' c_aoKc (Number, Number)
- markerUnits :: Lens' c_aoKc (Maybe MarkerUnit)
- markerViewBox :: Lens' c_aoKc (Maybe (Double, Double, Double, Double))
- markerWidth :: Lens' c_aoKc (Maybe Number)
- data GradientStop = GradientStop {}
- class HasGradientStop c_anhM where
- gradientStop :: Lens' c_anhM GradientStop
- gradientColor :: Lens' c_anhM PixelRGBA8
- gradientOffset :: Lens' c_anhM Float
- gradientOpacity :: Lens' c_anhM (Maybe Float)
- gradientPath :: Lens' c_anhM (Maybe GradientPathCommand)
- data LinearGradient = LinearGradient {}
- class HasLinearGradient c_apmJ where
- linearGradient :: Lens' c_apmJ LinearGradient
- linearGradientDrawAttributes :: Lens' c_apmJ DrawAttributes
- linearGradientSpread :: Lens' c_apmJ Spread
- linearGradientStart :: Lens' c_apmJ Point
- linearGradientStop :: Lens' c_apmJ Point
- linearGradientStops :: Lens' c_apmJ [GradientStop]
- linearGradientTransform :: Lens' c_apmJ [Transformation]
- linearGradientUnits :: Lens' c_apmJ CoordinateUnits
- data RadialGradient = RadialGradient {
- _radialGradientDrawAttributes :: DrawAttributes
- _radialGradientUnits :: CoordinateUnits
- _radialGradientCenter :: Point
- _radialGradientRadius :: Number
- _radialGradientFocusX :: Maybe Number
- _radialGradientFocusY :: Maybe Number
- _radialGradientSpread :: Spread
- _radialGradientTransform :: [Transformation]
- _radialGradientStops :: [GradientStop]
- class HasRadialGradient c_apwt where
- radialGradient :: Lens' c_apwt RadialGradient
- radialGradientDrawAttributes :: Lens' c_apwt DrawAttributes
- radialGradientCenter :: Lens' c_apwt Point
- radialGradientFocusX :: Lens' c_apwt (Maybe Number)
- radialGradientFocusY :: Lens' c_apwt (Maybe Number)
- radialGradientRadius :: Lens' c_apwt Number
- radialGradientSpread :: Lens' c_apwt Spread
- radialGradientStops :: Lens' c_apwt [GradientStop]
- radialGradientTransform :: Lens' c_apwt [Transformation]
- radialGradientUnits :: Lens' c_apwt CoordinateUnits
- data Pattern = Pattern {
- _patternDrawAttributes :: !DrawAttributes
- _patternViewBox :: !(Maybe (Double, Double, Double, Double))
- _patternWidth :: !Number
- _patternHeight :: !Number
- _patternPos :: !Point
- _patternHref :: !String
- _patternElements :: ![Tree]
- _patternUnit :: !CoordinateUnits
- _patternAspectRatio :: !PreserveAspectRatio
- _patternTransform :: !(Maybe [Transformation])
- class HasPattern c_aq6G where
- pattern :: Lens' c_aq6G Pattern
- patternAspectRatio :: Lens' c_aq6G PreserveAspectRatio
- patternDrawAttributes :: Lens' c_aq6G DrawAttributes
- patternElements :: Lens' c_aq6G [Tree]
- patternHeight :: Lens' c_aq6G Number
- patternHref :: Lens' c_aq6G String
- patternPos :: Lens' c_aq6G Point
- patternTransform :: Lens' c_aq6G (Maybe [Transformation])
- patternUnit :: Lens' c_aq6G CoordinateUnits
- patternViewBox :: Lens' c_aq6G (Maybe (Double, Double, Double, Double))
- patternWidth :: Lens' c_aq6G Number
- data Mask = Mask {}
- class HasMask c_apHI where
- mask :: Lens' c_apHI Mask
- maskContent :: Lens' c_apHI [Tree]
- maskContentUnits :: Lens' c_apHI CoordinateUnits
- maskDrawAttributes :: Lens' c_apHI DrawAttributes
- maskHeight :: Lens' c_apHI Number
- maskPosition :: Lens' c_apHI Point
- maskUnits :: Lens' c_apHI CoordinateUnits
- maskWidth :: Lens' c_apHI Number
- data ClipPath = ClipPath {}
- class HasClipPath c_apZq where
- clipPath :: Lens' c_apZq ClipPath
- clipPathContent :: Lens' c_apZq [Tree]
- clipPathDrawAttributes :: Lens' c_apZq DrawAttributes
- clipPathUnits :: Lens' c_apZq CoordinateUnits
- data PreserveAspectRatio = PreserveAspectRatio {}
- data Alignment
- data MeetSlice
- class HasPreserveAspectRatio a where
- isPathArc :: PathCommand -> Bool
- isPathWithArc :: Foldable f => f PathCommand -> Bool
- nameOfTree :: Tree -> Text
- zipTree :: ([[Tree]] -> Tree) -> Tree -> Tree
- mapTree :: (Tree -> Tree) -> Tree -> Tree
- foldTree :: (a -> Tree -> a) -> a -> Tree -> a
- toUserUnit :: Dpi -> Number -> Number
- mapNumber :: (Double -> Double) -> Number -> Number
Basic building types
Tell if a path command is absolute (in the current user coordiante) or relative to the previous poitn.
OriginAbsolute | Next point in absolute coordinate |
OriginRelative | Next point relative to the previous |
type RPoint = V2 Coord Source #
Real Point, fully determined and not dependant of the rendering context.
data PathCommand Source #
Path command definition.
MoveTo !Origin ![RPoint] |
|
LineTo !Origin ![RPoint] | Line to, |
HorizontalTo !Origin ![Coord] | Equivalent to the |
VerticalTo !Origin ![Coord] | Equivalent to the |
CurveTo !Origin ![(RPoint, RPoint, RPoint)] | Cubic bezier, |
SmoothCurveTo !Origin ![(RPoint, RPoint)] | Smooth cubic bezier, equivalent to |
QuadraticBezier !Origin ![(RPoint, RPoint)] | Quadratic bezier, |
SmoothQuadraticBezierCurveTo !Origin ![RPoint] | Quadratic bezier, |
EllipticalArc !Origin ![(Coord, Coord, Coord, Bool, Bool, RPoint)] | Eliptical arc, |
EndPath | Close the path, |
Instances
Eq PathCommand Source # | |
Defined in Graphics.SvgTree.Types (==) :: PathCommand -> PathCommand -> Bool # (/=) :: PathCommand -> PathCommand -> Bool # | |
Show PathCommand Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> PathCommand -> ShowS # show :: PathCommand -> String # showList :: [PathCommand] -> ShowS # |
data Transformation Source #
Describe the content of the transformation
attribute.
see _transform
and transform
.
TransformMatrix !Coord !Coord !Coord !Coord !Coord !Coord | Directly encode the translation matrix. |
Translate !Double !Double | Translation along a vector |
Scale !Double !(Maybe Double) | Scaling on both axis or on X axis and Y axis. |
Rotate !Double !(Maybe (Double, Double)) | Rotation around `(0, 0)` or around an optional point. |
SkewX !Double | Skew transformation along the X axis. |
SkewY !Double | Skew transformation along the Y axis. |
TransformUnknown | Unkown transformation, like identity. |
Instances
Eq Transformation Source # | |
Defined in Graphics.SvgTree.Types (==) :: Transformation -> Transformation -> Bool # (/=) :: Transformation -> Transformation -> Bool # | |
Show Transformation Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> Transformation -> ShowS # show :: Transformation -> String # showList :: [Transformation] -> ShowS # |
data ElementRef Source #
Correspond to the possible values of the
the attributes which are either none
or
`url(#elem)`
Instances
Eq ElementRef Source # | |
Defined in Graphics.SvgTree.Types (==) :: ElementRef -> ElementRef -> Bool # (/=) :: ElementRef -> ElementRef -> Bool # | |
Show ElementRef Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> ElementRef -> ShowS # show :: ElementRef -> String # showList :: [ElementRef] -> ShowS # |
data CoordinateUnits Source #
Define the possible values of various *units attributes used in the definition of the gradients and masks.
CoordUserSpace |
|
CoordBoundingBox |
|
Instances
Eq CoordinateUnits Source # | |
Defined in Graphics.SvgTree.Types (==) :: CoordinateUnits -> CoordinateUnits -> Bool # (/=) :: CoordinateUnits -> CoordinateUnits -> Bool # | |
Show CoordinateUnits Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> CoordinateUnits -> ShowS # show :: CoordinateUnits -> String # showList :: [CoordinateUnits] -> ShowS # |
Building helpers
serializeNumber :: Number -> String Source #
Encode the number to string which can be used in a CSS or a svg attributes.
serializeTransformation :: Transformation -> String Source #
Convert the Transformation to a string which can be directly used in a svg attributes.
serializeTransformations :: [Transformation] -> String Source #
Transform a list of transformations to a string for svg
transform
attributes.
Drawing control types
Describe how the line should be terminated
when stroking them. Describe the values of the
`stroke-linecap` attribute.
See _strokeLineCap
Define the possible values of the `stroke-linejoin`
attribute.
see _strokeLineJoin
Main type for the scene description, reorient to specific type describing each tag.
Instances
Encode complex number possibly dependant to the current render size.
Num Double | Simple coordinate in current user coordinate. |
Px Double | With suffix "px" |
Em Double | Number relative to the current font size. |
Percent Double | Number relative to the current viewport size. |
Pc Double | |
Mm Double | Number in millimeters, relative to DPI. |
Cm Double | Number in centimeters, relative to DPI. |
Point Double | Number in points, relative to DPI. |
Inches Double | Number in inches, relative to DPI. |
Define the possible values for the spreadMethod
values used for the gradient definitions.
SpreadRepeat |
|
SpreadPad |
|
SpreadReflect | `reflect value` |
Describe the different value which can be used
in the fill
or stroke
attributes.
ColorRef PixelRGBA8 | |
TextureRef String | Link to a complex texture (url(#name)) |
FillNone | Equivalent to the |
Sum types helping keeping track of all the namable elemens in a SVG document.
Describe the possile filling algorithms. Map the values of the `fill-rule` attributes.
FillEvenOdd | Correspond to the |
FillNonZero | Correspond to the |
Classify the font style, used to search a matching font in the FontCache.
Alias describing a "dot per inch" information used for size calculation (see toUserUnit).
class WithDefaultSvg a where Source #
Define an empty 'default' element for the SVG tree. It is used as base when parsing the element from XML.
defaultSvg :: a Source #
The default element.
Instances
Main type
Represent a full svg document with style, geometry and named elements.
Document | |
|
Instances
Eq Document Source # | |
Show Document Source # | |
HasDocument Document Source # | |
Defined in Graphics.SvgTree.Types document :: Lens' Document Document Source # description :: Lens' Document String Source # documentAspectRatio :: Lens' Document PreserveAspectRatio Source # documentLocation :: Lens' Document FilePath Source # elements :: Lens' Document [Tree] Source # height :: Lens' Document (Maybe Number) Source # viewBox :: Lens' Document (Maybe (Double, Double, Double, Double)) Source # |
class HasDocument c where Source #
Lenses associated to a SVG document.
document :: Lens' c Document Source #
description :: Lens' c String Source #
documentAspectRatio :: Lens' c PreserveAspectRatio Source #
documentLocation :: Lens' c FilePath Source #
elements :: Lens' c [Tree] Source #
height :: Lens' c (Maybe Number) Source #
viewBox :: Lens' c (Maybe (Double, Double, Double, Double)) Source #
Instances
HasDocument Document Source # | |
Defined in Graphics.SvgTree.Types document :: Lens' Document Document Source # description :: Lens' Document String Source # documentAspectRatio :: Lens' Document PreserveAspectRatio Source # documentLocation :: Lens' Document FilePath Source # elements :: Lens' Document [Tree] Source # height :: Lens' Document (Maybe Number) Source # viewBox :: Lens' Document (Maybe (Double, Double, Double, Double)) Source # |
documentSize :: Dpi -> Document -> (Int, Int) Source #
Calculate the document size in function of the different available attributes in the document.
Drawing attributes
data DrawAttributes Source #
This type define how to draw any primitives, which color to use, how to stroke the primitives and the potential transformations to use.
All these attributes are propagated to the children.
DrawAttributes | |
|
Instances
class HasDrawAttributes c where Source #
drawAttributes :: Lens' c DrawAttributes Source #
attrClass :: Lens' c [Text] Source #
attrId :: Lens' c (Maybe String) Source #
clipPathRef :: Lens' c (Last ElementRef) Source #
clipRule :: Lens' c (Last FillRule) Source #
fillColor :: Lens' c (Last Texture) Source #
fillOpacity :: Lens' c (Maybe Float) Source #
fillRule :: Lens' c (Last FillRule) Source #
filterRef :: Lens' c (Last ElementRef) Source #
fontFamily :: Lens' c (Last [String]) Source #
fontSize :: Lens' c (Last Number) Source #
fontStyle :: Lens' c (Last FontStyle) Source #
groupOpacity :: Lens' c (Maybe Float) Source #
markerEnd :: Lens' c (Last ElementRef) Source #
markerMid :: Lens' c (Last ElementRef) Source #
markerStart :: Lens' c (Last ElementRef) Source #
maskRef :: Lens' c (Last ElementRef) Source #
preRendered :: Lens' c (Maybe String) Source #
strokeColor :: Lens' c (Last Texture) Source #
strokeDashArray :: Lens' c (Last [Number]) Source #
strokeLineCap :: Lens' c (Last Cap) Source #
strokeLineJoin :: Lens' c (Last LineJoin) Source #
strokeMiterLimit :: Lens' c (Last Double) Source #
strokeOffset :: Lens' c (Last Number) Source #
strokeOpacity :: Lens' c (Maybe Float) Source #
strokeWidth :: Lens' c (Last Number) Source #
textAnchor :: Lens' c (Last TextAnchor) Source #
Instances
Filters
data FilterElement Source #
Instances
Eq FilterElement Source # | |
Defined in Graphics.SvgTree.Types (==) :: FilterElement -> FilterElement -> Bool # (/=) :: FilterElement -> FilterElement -> Bool # | |
Show FilterElement Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> FilterElement -> ShowS # show :: FilterElement -> String # showList :: [FilterElement] -> ShowS # | |
WithDefaultSvg FilterElement Source # | |
Defined in Graphics.SvgTree.Types | |
HasFilterAttributes FilterElement Source # | |
Defined in Graphics.SvgTree.Types |
data FilterAttributes Source #
FilterAttributes | |
|
Instances
Eq FilterAttributes Source # | |
Defined in Graphics.SvgTree.Types (==) :: FilterAttributes -> FilterAttributes -> Bool # (/=) :: FilterAttributes -> FilterAttributes -> Bool # | |
Show FilterAttributes Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> FilterAttributes -> ShowS # show :: FilterAttributes -> String # showList :: [FilterAttributes] -> ShowS # | |
WithDefaultSvg FilterAttributes Source # | |
Defined in Graphics.SvgTree.Types | |
HasFilterAttributes FilterAttributes Source # | |
Defined in Graphics.SvgTree.Types filterAttributes :: Lens' FilterAttributes FilterAttributes Source # filterHeight :: Lens' FilterAttributes (Last Number) Source # filterResult :: Lens' FilterAttributes (Maybe String) Source # filterWidth :: Lens' FilterAttributes (Last Number) Source # |
class HasFilterAttributes c_asYk where Source #
Lenses for the FilterAttributes type.
filterAttributes :: Lens' c_asYk FilterAttributes Source #
filterHeight :: Lens' c_asYk (Last Number) Source #
filterResult :: Lens' c_asYk (Maybe String) Source #
filterWidth :: Lens' c_asYk (Last Number) Source #
Instances
data FilterSource Source #
Instances
Eq FilterSource Source # | |
Defined in Graphics.SvgTree.Types (==) :: FilterSource -> FilterSource -> Bool # (/=) :: FilterSource -> FilterSource -> Bool # | |
Show FilterSource Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> FilterSource -> ShowS # show :: FilterSource -> String # showList :: [FilterSource] -> ShowS # |
data ColorMatrixType Source #
Instances
Eq ColorMatrixType Source # | |
Defined in Graphics.SvgTree.Types (==) :: ColorMatrixType -> ColorMatrixType -> Bool # (/=) :: ColorMatrixType -> ColorMatrixType -> Bool # | |
Show ColorMatrixType Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> ColorMatrixType -> ShowS # show :: ColorMatrixType -> String # showList :: [ColorMatrixType] -> ShowS # |
class HasColorMatrix c where Source #
colorMatrix :: Lens' c ColorMatrix Source #
colorMatrixDrawAttributes :: Lens' c DrawAttributes Source #
colorMatrixFilterAttr :: Lens' c FilterAttributes Source #
colorMatrixIn :: Lens' c (Last FilterSource) Source #
colorMatrixType :: Lens' c ColorMatrixType Source #
colorMatrixValues :: Lens' c String Source #
Instances
data ColorMatrix Source #
Instances
class HasComposite c where Source #
composite :: Lens' c Composite Source #
compositeDrawAttributes :: Lens' c DrawAttributes Source #
compositeFilterAttr :: Lens' c FilterAttributes Source #
compositeIn :: Lens' c (Last FilterSource) Source #
compositeIn2 :: Lens' c (Last FilterSource) Source #
compositeK1 :: Lens' c Number Source #
compositeK2 :: Lens' c Number Source #
compositeK3 :: Lens' c Number Source #
compositeK4 :: Lens' c Number Source #
Instances
Instances
data CompositeOperator Source #
Instances
Eq CompositeOperator Source # | |
Defined in Graphics.SvgTree.Types (==) :: CompositeOperator -> CompositeOperator -> Bool # (/=) :: CompositeOperator -> CompositeOperator -> Bool # | |
Show CompositeOperator Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> CompositeOperator -> ShowS # show :: CompositeOperator -> String # showList :: [CompositeOperator] -> ShowS # |
class HasGaussianBlur c where Source #
gaussianBlur :: Lens' c GaussianBlur Source #
gaussianBlurDrawAttributes :: Lens' c DrawAttributes Source #
gaussianBlurEdgeMode :: Lens' c EdgeMode Source #
gaussianBlurFilterAttr :: Lens' c FilterAttributes Source #
gaussianBlurIn :: Lens' c (Last FilterSource) Source #
Instances
data GaussianBlur Source #
Instances
class HasTurbulence c where Source #
turbulence :: Lens' c Turbulence Source #
turbulenceBaseFrequency :: Lens' c (Double, Last Double) Source #
turbulenceDrawAttributes :: Lens' c DrawAttributes Source #
turbulenceFilterAttr :: Lens' c FilterAttributes Source #
turbulenceNumOctaves :: Lens' c Int Source #
turbulenceSeed :: Lens' c Double Source #
Instances
data Turbulence Source #
Instances
data TurbulenceType Source #
Instances
Eq TurbulenceType Source # | |
Defined in Graphics.SvgTree.Types (==) :: TurbulenceType -> TurbulenceType -> Bool # (/=) :: TurbulenceType -> TurbulenceType -> Bool # | |
Show TurbulenceType Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> TurbulenceType -> ShowS # show :: TurbulenceType -> String # showList :: [TurbulenceType] -> ShowS # |
data StitchTiles Source #
Instances
Eq StitchTiles Source # | |
Defined in Graphics.SvgTree.Types (==) :: StitchTiles -> StitchTiles -> Bool # (/=) :: StitchTiles -> StitchTiles -> Bool # | |
Show StitchTiles Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> StitchTiles -> ShowS # show :: StitchTiles -> String # showList :: [StitchTiles] -> ShowS # |
class HasDisplacementMap c where Source #
displacementMap :: Lens' c DisplacementMap Source #
displacementMapDrawAttributes :: Lens' c DrawAttributes Source #
displacementMapFilterAttr :: Lens' c FilterAttributes Source #
displacementMapIn :: Lens' c (Last FilterSource) Source #
displacementMapIn2 :: Lens' c (Last FilterSource) Source #
displacementMapScale :: Lens' c (Last Double) Source #
displacementMapXChannelSelector :: Lens' c ChannelSelector Source #
displacementMapYChannelSelector :: Lens' c ChannelSelector Source #
Instances
data DisplacementMap Source #
Instances
data ChannelSelector Source #
Instances
Eq ChannelSelector Source # | |
Defined in Graphics.SvgTree.Types (==) :: ChannelSelector -> ChannelSelector -> Bool # (/=) :: ChannelSelector -> ChannelSelector -> Bool # | |
Show ChannelSelector Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> ChannelSelector -> ShowS # show :: ChannelSelector -> String # showList :: [ChannelSelector] -> ShowS # |
SVG drawing primitives
Rectangle
Define a rectangle. Correspond to `<rectangle>` svg tag.
Rectangle | |
|
Instances
class HasRectangle a where Source #
Lenses for the Rectangle type.
rectangle :: Lens' a Rectangle Source #
rectCornerRadius :: Lens' a (Maybe Number, Maybe Number) Source #
rectDrawAttributes :: Lens' a DrawAttributes Source #
rectHeight :: Lens' a (Maybe Number) Source #
rectUpperLeftCorner :: Lens' a Point Source #
Instances
HasRectangle Rectangle Source # | |
Defined in Graphics.SvgTree.Types |
Line
Define a simple line. Correspond to the `<line>` tag.
Line | |
|
Instances
class HasLine a where Source #
Lenses for the Line type.
lineDrawAttributes :: Lens' a DrawAttributes Source #
linePoint1 :: Lens' a Point Source #
linePoint2 :: Lens' a Point Source #
Polygon
Primitive decriving polygon composed of segements. Correspond to the `<polygon>` tag
Polygon | |
|
Instances
class HasPolygon a where Source #
Lenses for the Polygon type
polygon :: Lens' a Polygon Source #
polygonDrawAttributes :: Lens' a DrawAttributes Source #
polygonPoints :: Lens' a [RPoint] Source #
Instances
HasPolygon Polygon Source # | |
Defined in Graphics.SvgTree.Types |
Polyline
This primitive describe an unclosed suite of segments. Correspond to the `<polyline>` tag.
PolyLine | |
|
Instances
class HasPolyLine a where Source #
Lenses for the PolyLine type.
polyLine :: Lens' a PolyLine Source #
polyLineDrawAttributes :: Lens' a DrawAttributes Source #
polyLinePoints :: Lens' a [RPoint] Source #
Instances
HasPolyLine PolyLine Source # | |
Path
Type mapping the `<path>` svg tag.
Path | |
|
Instances
class HasPath c_alhy where Source #
Lenses for the Path type
path :: Lens' c_alhy Path Source #
pathDefinition :: Lens' c_alhy [PathCommand] Source #
pathDrawAttributes :: Lens' c_alhy DrawAttributes Source #
Instances
HasPath Path Source # | |
Defined in Graphics.SvgTree.Types |
Circle
Define a `<circle>`.
Circle | |
|
Instances
class HasCircle a where Source #
Lenses for the Circle type.
circle :: Lens' a Circle Source #
circleCenter :: Lens' a Point Source #
circleDrawAttributes :: Lens' a DrawAttributes Source #
circleRadius :: Lens' a Number Source #
Ellipse
Define an `<ellipse>`
Ellipse | |
|
Instances
class HasEllipse c_amWt where Source #
Lenses for the ellipse type.
ellipse :: Lens' c_amWt Ellipse Source #
ellipseCenter :: Lens' c_amWt Point Source #
ellipseDrawAttributes :: Lens' c_amWt DrawAttributes Source #
ellipseXRadius :: Lens' c_amWt Number Source #
ellipseYRadius :: Lens' c_amWt Number Source #
Instances
HasEllipse Ellipse Source # | |
Mesh (gradient mesh)
data GradientPathCommand Source #
Description of path used in meshgradient tag
GLine !Origin !(Maybe RPoint) | Line to, |
GCurve !Origin !RPoint !RPoint !(Maybe RPoint) | Cubic bezier, |
GClose |
|
Instances
Eq GradientPathCommand Source # | |
Defined in Graphics.SvgTree.Types (==) :: GradientPathCommand -> GradientPathCommand -> Bool # (/=) :: GradientPathCommand -> GradientPathCommand -> Bool # | |
Show GradientPathCommand Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> GradientPathCommand -> ShowS # show :: GradientPathCommand -> String # showList :: [GradientPathCommand] -> ShowS # |
data MeshGradientType Source #
Instances
Eq MeshGradientType Source # | |
Defined in Graphics.SvgTree.Types (==) :: MeshGradientType -> MeshGradientType -> Bool # (/=) :: MeshGradientType -> MeshGradientType -> Bool # | |
Show MeshGradientType Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> MeshGradientType -> ShowS # show :: MeshGradientType -> String # showList :: [MeshGradientType] -> ShowS # |
data MeshGradient Source #
Define a `<meshgradient>` tag.
MeshGradient | |
|
Instances
class HasMeshGradient c_anxG where Source #
meshGradient :: Lens' c_anxG MeshGradient Source #
meshGradientDrawAttributes :: Lens' c_anxG DrawAttributes Source #
meshGradientRows :: Lens' c_anxG [MeshGradientRow] Source #
meshGradientTransform :: Lens' c_anxG [Transformation] Source #
meshGradientType :: Lens' c_anxG MeshGradientType Source #
meshGradientUnits :: Lens' c_anxG CoordinateUnits Source #
meshGradientX :: Lens' c_anxG Number Source #
meshGradientY :: Lens' c_anxG Number Source #
Instances
data MeshGradientRow Source #
Define a `<meshrow>` tag.
MeshGradientRow | |
|
Instances
Eq MeshGradientRow Source # | |
Defined in Graphics.SvgTree.Types (==) :: MeshGradientRow -> MeshGradientRow -> Bool # (/=) :: MeshGradientRow -> MeshGradientRow -> Bool # | |
Show MeshGradientRow Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> MeshGradientRow -> ShowS # show :: MeshGradientRow -> String # showList :: [MeshGradientRow] -> ShowS # | |
WithDefaultSvg MeshGradientRow Source # | |
Defined in Graphics.SvgTree.Types | |
HasMeshGradientRow MeshGradientRow Source # | |
class HasMeshGradientRow c_antr where Source #
meshGradientRow :: Lens' c_antr MeshGradientRow Source #
meshGradientRowPatches :: Lens' c_antr [MeshGradientPatch] Source #
data MeshGradientPatch Source #
Define `<meshpatch>` SVG tag
MeshGradientPatch | |
|
Instances
Eq MeshGradientPatch Source # | |
Defined in Graphics.SvgTree.Types (==) :: MeshGradientPatch -> MeshGradientPatch -> Bool # (/=) :: MeshGradientPatch -> MeshGradientPatch -> Bool # | |
Show MeshGradientPatch Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> MeshGradientPatch -> ShowS # show :: MeshGradientPatch -> String # showList :: [MeshGradientPatch] -> ShowS # | |
WithDefaultSvg MeshGradientPatch Source # | |
Defined in Graphics.SvgTree.Types | |
HasMeshGradientPatch MeshGradientPatch Source # | |
class HasMeshGradientPatch c_annx where Source #
meshGradientPatch :: Lens' c_annx MeshGradientPatch Source #
meshGradientPatchStops :: Lens' c_annx [GradientStop] Source #
Image
Define an `<image>` tag.
Image | |
|
Instances
class HasImage c_anI7 where Source #
Lenses for the Image type.
image :: Lens' c_anI7 Image Source #
imageAspectRatio :: Lens' c_anI7 PreserveAspectRatio Source #
imageCornerUpperLeft :: Lens' c_anI7 Point Source #
imageDrawAttributes :: Lens' c_anI7 DrawAttributes Source #
imageHeight :: Lens' c_anI7 Number Source #
imageHref :: Lens' c_anI7 String Source #
imageWidth :: Lens' c_anI7 Number Source #
Instances
HasImage Image Source # | |
Defined in Graphics.SvgTree.Types |
Use
Define an `<use>` for a named content. Every named content can be reused in the document using this element.
Use | |
|
Instances
class HasUse c_anR3 where Source #
Lenses for the Use type.
use :: Lens' c_anR3 Use Source #
useBase :: Lens' c_anR3 Point Source #
useDrawAttributes :: Lens' c_anR3 DrawAttributes Source #
useHeight :: Lens' c_anR3 (Maybe Number) Source #
Grouping primitives
Group
Define a SVG group, corresponding `<g>` tag.
Group | |
|
Instances
class HasGroup g a | g -> a where Source #
Lenses associated to the Group type.
group :: Lens' g (Group a) Source #
groupAspectRatio :: Lens' g PreserveAspectRatio Source #
groupChildren :: Lens' g [a] Source #
groupDrawAttributes :: Lens' g DrawAttributes Source #
groupViewBox :: Lens' g (Maybe (Double, Double, Double, Double)) Source #
Instances
HasGroup (Definitions a) a Source # | |
Defined in Graphics.SvgTree.Types group :: Lens' (Definitions a) (Group a) Source # groupAspectRatio :: Lens' (Definitions a) PreserveAspectRatio Source # groupChildren :: Lens' (Definitions a) [a] Source # groupDrawAttributes :: Lens' (Definitions a) DrawAttributes Source # groupViewBox :: Lens' (Definitions a) (Maybe (Double, Double, Double, Double)) Source # | |
HasGroup (Symbol a) a Source # | |
Defined in Graphics.SvgTree.Types group :: Lens' (Symbol a) (Group a) Source # groupAspectRatio :: Lens' (Symbol a) PreserveAspectRatio Source # groupChildren :: Lens' (Symbol a) [a] Source # groupDrawAttributes :: Lens' (Symbol a) DrawAttributes Source # groupViewBox :: Lens' (Symbol a) (Maybe (Double, Double, Double, Double)) Source # | |
HasGroup (Group a) a Source # | |
Defined in Graphics.SvgTree.Types |
Symbol
Define the `<symbol>` tag, equivalent to a hidden named group.
Symbol | |
|
Instances
groupOfSymbol :: Lens (Symbol s) (Symbol t) (Group s) (Group t) Source #
Lenses associated with the Symbol type.
Definitions
newtype Definitions a Source #
Define the `<defs>` tag, equivalent to a named symbol.
Instances
groupOfDefinitions :: Lens (Definitions s) (Definitions t) (Group s) (Group t) Source #
Lenses associated with the Definitions type.
Filter
Define the `<filter>` tag.
Instances
Text related types
Text
Define the global `<tag>` SVG tag.
Text | |
|
Instances
class HasText c_aorD where Source #
Lenses for the Text type.
text :: Lens' c_aorD Text Source #
textAdjust :: Lens' c_aorD TextAdjust Source #
data TextAnchor Source #
Tell where to anchor the text, where the position given is realative to the text.
TextAnchorStart | The text with left aligned, or start at the postion
If the point is the *THE_TEXT_TO_PRINT Equivalent to the |
TextAnchorMiddle | The text is middle aligned, so the text will be at the left and right of the position: THE_TEXT*TO_PRINT Equivalent to the |
TextAnchorEnd | The text is right aligned. THE_TEXT_TO_PRINT* Equivalent to the |
Instances
Eq TextAnchor Source # | |
Defined in Graphics.SvgTree.Types (==) :: TextAnchor -> TextAnchor -> Bool # (/=) :: TextAnchor -> TextAnchor -> Bool # | |
Show TextAnchor Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> TextAnchor -> ShowS # show :: TextAnchor -> String # showList :: [TextAnchor] -> ShowS # |
textAt :: Point -> Text -> Text Source #
Little helper to create a SVG text at a given baseline position.
Text path
Describe the `<textpath>` SVG tag.
TextPath | |
|
class HasTextPath c where Source #
textPath :: Lens' c TextPath Source #
textPathMethod :: Lens' c TextPathMethod Source #
textPathName :: Lens' c String Source #
Instances
HasTextPath TextPath Source # | |
data TextPathSpacing Source #
Describe the content of the spacing
text path
attribute.
TextPathSpacingExact | Map to the |
TextPathSpacingAuto | Map to the |
Instances
Eq TextPathSpacing Source # | |
Defined in Graphics.SvgTree.Types (==) :: TextPathSpacing -> TextPathSpacing -> Bool # (/=) :: TextPathSpacing -> TextPathSpacing -> Bool # | |
Show TextPathSpacing Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> TextPathSpacing -> ShowS # show :: TextPathSpacing -> String # showList :: [TextPathSpacing] -> ShowS # |
data TextPathMethod Source #
Describe the content of the method
attribute on
text path.
TextPathAlign | Map to the |
TextPathStretch | Map to the |
Instances
Eq TextPathMethod Source # | |
Defined in Graphics.SvgTree.Types (==) :: TextPathMethod -> TextPathMethod -> Bool # (/=) :: TextPathMethod -> TextPathMethod -> Bool # | |
Show TextPathMethod Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> TextPathMethod -> ShowS # show :: TextPathMethod -> String # showList :: [TextPathMethod] -> ShowS # |
Text span.
data TextSpanContent Source #
Define the content of a `<tspan>` tag.
SpanText !Text | Raw text |
SpanTextRef !String | Equivalent to a `<tref>` |
SpanSub !TextSpan | Define a `<tspan>` |
Instances
Eq TextSpanContent Source # | |
Defined in Graphics.SvgTree.Types (==) :: TextSpanContent -> TextSpanContent -> Bool # (/=) :: TextSpanContent -> TextSpanContent -> Bool # | |
Show TextSpanContent Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> TextSpanContent -> ShowS # show :: TextSpanContent -> String # showList :: [TextSpanContent] -> ShowS # |
Define a `<tspan>` tag.
TextSpan | |
|
class HasTextSpan c_aobD where Source #
Lenses for the TextSpan type.
textSpan :: Lens' c_aobD TextSpan Source #
spanContent :: Lens' c_aobD [TextSpanContent] Source #
spanDrawAttributes :: Lens' c_aobD DrawAttributes Source #
Instances
HasTextSpan TextSpan Source # | |
Define position information associated to `<text>` or `<tspan>` svg tag.
TextInfo | |
|
Instances
Eq TextInfo Source # | |
Show TextInfo Source # | |
Semigroup TextInfo Source # | |
Monoid TextInfo Source # | |
WithDefaultSvg TextInfo Source # | |
Defined in Graphics.SvgTree.Types | |
HasTextInfo TextInfo Source # | |
Defined in Graphics.SvgTree.Types |
class HasTextInfo c_ao0m where Source #
Lenses for the TextInfo type.
textInfo :: Lens' c_ao0m TextInfo Source #
textInfoDX :: Lens' c_ao0m [Number] Source #
textInfoDY :: Lens' c_ao0m [Number] Source #
textInfoLength :: Lens' c_ao0m (Maybe Number) Source #
textInfoRotate :: Lens' c_ao0m [Double] Source #
Instances
HasTextInfo TextInfo Source # | |
Defined in Graphics.SvgTree.Types |
data TextAdjust Source #
Define the possible values of the lengthAdjust
attribute.
TextAdjustSpacing | Value |
TextAdjustSpacingAndGlyphs | Value |
Instances
Eq TextAdjust Source # | |
Defined in Graphics.SvgTree.Types (==) :: TextAdjust -> TextAdjust -> Bool # (/=) :: TextAdjust -> TextAdjust -> Bool # | |
Show TextAdjust Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> TextAdjust -> ShowS # show :: TextAdjust -> String # showList :: [TextAdjust] -> ShowS # |
Marker definition
Define the `<marker>` tag.
Marker | |
|
Instances
Define the content of the markerUnits
attribute
on the Marker.
OverflowVisible | Value |
OverflowHidden | Value |
data MarkerOrientation Source #
Define the orientation, associated to the
orient
attribute on the Marker
OrientationAuto | Auto value |
OrientationAngle Coord | Specific angle. |
Instances
Eq MarkerOrientation Source # | |
Defined in Graphics.SvgTree.Types (==) :: MarkerOrientation -> MarkerOrientation -> Bool # (/=) :: MarkerOrientation -> MarkerOrientation -> Bool # | |
Show MarkerOrientation Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> MarkerOrientation -> ShowS # show :: MarkerOrientation -> String # showList :: [MarkerOrientation] -> ShowS # |
data MarkerUnit Source #
Define the content of the markerUnits
attribute
on the Marker.
MarkerUnitStrokeWidth | Value |
MarkerUnitUserSpaceOnUse | Value |
Instances
Eq MarkerUnit Source # | |
Defined in Graphics.SvgTree.Types (==) :: MarkerUnit -> MarkerUnit -> Bool # (/=) :: MarkerUnit -> MarkerUnit -> Bool # | |
Show MarkerUnit Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> MarkerUnit -> ShowS # show :: MarkerUnit -> String # showList :: [MarkerUnit] -> ShowS # |
class HasMarker c_aoKc where Source #
Lenses for the Marker type.
marker :: Lens' c_aoKc Marker Source #
markerAspectRatio :: Lens' c_aoKc PreserveAspectRatio Source #
markerDrawAttributes :: Lens' c_aoKc DrawAttributes Source #
markerElements :: Lens' c_aoKc [Tree] Source #
markerHeight :: Lens' c_aoKc (Maybe Number) Source #
markerOrient :: Lens' c_aoKc (Maybe MarkerOrientation) Source #
markerOverflow :: Lens' c_aoKc (Maybe Overflow) Source #
markerRefPoint :: Lens' c_aoKc (Number, Number) Source #
markerUnits :: Lens' c_aoKc (Maybe MarkerUnit) Source #
markerViewBox :: Lens' c_aoKc (Maybe (Double, Double, Double, Double)) Source #
Instances
Gradient definition
data GradientStop Source #
Define a color stop for the gradients. Represent the `<stop>` SVG tag.
GradientStop | |
|
Instances
Eq GradientStop Source # | |
Defined in Graphics.SvgTree.Types (==) :: GradientStop -> GradientStop -> Bool # (/=) :: GradientStop -> GradientStop -> Bool # | |
Show GradientStop Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> GradientStop -> ShowS # show :: GradientStop -> String # showList :: [GradientStop] -> ShowS # | |
WithDefaultSvg GradientStop Source # | |
Defined in Graphics.SvgTree.Types | |
HasGradientStop GradientStop Source # | |
Defined in Graphics.SvgTree.Types |
class HasGradientStop c_anhM where Source #
Lenses for the GradientStop type.
gradientStop :: Lens' c_anhM GradientStop Source #
gradientColor :: Lens' c_anhM PixelRGBA8 Source #
gradientOffset :: Lens' c_anhM Float Source #
gradientOpacity :: Lens' c_anhM (Maybe Float) Source #
gradientPath :: Lens' c_anhM (Maybe GradientPathCommand) Source #
Instances
HasGradientStop GradientStop Source # | |
Defined in Graphics.SvgTree.Types |
Linear Gradient
data LinearGradient Source #
Define a `<linearGradient>` tag.
LinearGradient | |
|
Instances
class HasLinearGradient c_apmJ where Source #
Lenses for the LinearGradient type.
linearGradient :: Lens' c_apmJ LinearGradient Source #
linearGradientDrawAttributes :: Lens' c_apmJ DrawAttributes Source #
linearGradientSpread :: Lens' c_apmJ Spread Source #
linearGradientStart :: Lens' c_apmJ Point Source #
linearGradientStop :: Lens' c_apmJ Point Source #
linearGradientStops :: Lens' c_apmJ [GradientStop] Source #
linearGradientTransform :: Lens' c_apmJ [Transformation] Source #
linearGradientUnits :: Lens' c_apmJ CoordinateUnits Source #
Instances
Radial Gradient
data RadialGradient Source #
Define a `<radialGradient>` tag.
RadialGradient | |
|
Instances
class HasRadialGradient c_apwt where Source #
Lenses for the RadialGradient type.
radialGradient :: Lens' c_apwt RadialGradient Source #
radialGradientDrawAttributes :: Lens' c_apwt DrawAttributes Source #
radialGradientCenter :: Lens' c_apwt Point Source #
radialGradientFocusX :: Lens' c_apwt (Maybe Number) Source #
radialGradientFocusY :: Lens' c_apwt (Maybe Number) Source #
radialGradientRadius :: Lens' c_apwt Number Source #
radialGradientSpread :: Lens' c_apwt Spread Source #
radialGradientStops :: Lens' c_apwt [GradientStop] Source #
radialGradientTransform :: Lens' c_apwt [Transformation] Source #
radialGradientUnits :: Lens' c_apwt CoordinateUnits Source #
Instances
Pattern definition
Define a `<pattern>` tag.
Pattern | |
|
Instances
class HasPattern c_aq6G where Source #
Lenses for the Patter type.
pattern :: Lens' c_aq6G Pattern Source #
patternAspectRatio :: Lens' c_aq6G PreserveAspectRatio Source #
patternDrawAttributes :: Lens' c_aq6G DrawAttributes Source #
patternElements :: Lens' c_aq6G [Tree] Source #
patternHeight :: Lens' c_aq6G Number Source #
patternHref :: Lens' c_aq6G String Source #
patternPos :: Lens' c_aq6G Point Source #
patternTransform :: Lens' c_aq6G (Maybe [Transformation]) Source #
patternUnit :: Lens' c_aq6G CoordinateUnits Source #
patternViewBox :: Lens' c_aq6G (Maybe (Double, Double, Double, Double)) Source #
patternWidth :: Lens' c_aq6G Number Source #
Instances
Mask definition
Define a SVG `<mask>` tag.
Mask | |
|
Instances
class HasMask c_apHI where Source #
Lenses for the Mask type.
mask :: Lens' c_apHI Mask Source #
maskContent :: Lens' c_apHI [Tree] Source #
maskContentUnits :: Lens' c_apHI CoordinateUnits Source #
maskDrawAttributes :: Lens' c_apHI DrawAttributes Source #
maskHeight :: Lens' c_apHI Number Source #
maskPosition :: Lens' c_apHI Point Source #
maskUnits :: Lens' c_apHI CoordinateUnits Source #
Instances
HasMask Mask Source # | |
Defined in Graphics.SvgTree.Types mask :: Lens' Mask Mask Source # maskContent :: Lens' Mask [Tree] Source # maskContentUnits :: Lens' Mask CoordinateUnits Source # maskDrawAttributes :: Lens' Mask DrawAttributes Source # maskHeight :: Lens' Mask Number Source # maskPosition :: Lens' Mask Point Source # |
Clip path definition
Define a `<clipPath>` tag.
ClipPath | |
|
Instances
class HasClipPath c_apZq where Source #
Lenses for the ClipPath type.
clipPath :: Lens' c_apZq ClipPath Source #
clipPathContent :: Lens' c_apZq [Tree] Source #
clipPathDrawAttributes :: Lens' c_apZq DrawAttributes Source #
clipPathUnits :: Lens' c_apZq CoordinateUnits Source #
Instances
HasClipPath ClipPath Source # | |
Aspect Ratio description
data PreserveAspectRatio Source #
Describe the content of the preserveAspectRatio attribute.
Instances
Eq PreserveAspectRatio Source # | |
Defined in Graphics.SvgTree.Types (==) :: PreserveAspectRatio -> PreserveAspectRatio -> Bool # (/=) :: PreserveAspectRatio -> PreserveAspectRatio -> Bool # | |
Show PreserveAspectRatio Source # | |
Defined in Graphics.SvgTree.Types showsPrec :: Int -> PreserveAspectRatio -> ShowS # show :: PreserveAspectRatio -> String # showList :: [PreserveAspectRatio] -> ShowS # | |
WithDefaultSvg PreserveAspectRatio Source # | |
Defined in Graphics.SvgTree.Types | |
HasPreserveAspectRatio PreserveAspectRatio Source # | |
Defined in Graphics.SvgTree.Types |
This type represent the align information of the preserveAspectRatio SVGattribute
AlignNone | "none" value |
AlignxMinYMin | |
AlignxMidYMin | "xMidYMin" value |
AlignxMaxYMin | "xMaxYMin" value |
AlignxMinYMid | "xMinYMid" value |
AlignxMidYMid | "xMidYMid" value |
AlignxMaxYMid | "xMaxYMid" value |
AlignxMinYMax | "xMinYMax" value |
AlignxMidYMax | "xMidYMax" value |
AlignxMaxYMax | "xMaxYMax" value |
This type represent the "meet or slice" information of the preserveAspectRatio SVGattribute
class HasPreserveAspectRatio a where Source #
Lenses for the PreserveAspectRatio type
preserveAspectRatio :: Lens' a PreserveAspectRatio Source #
aspectRatioAlign :: Lens' a Alignment Source #
aspectRatioDefer :: Lens' a Bool Source #
Instances
HasPreserveAspectRatio PreserveAspectRatio Source # | |
Defined in Graphics.SvgTree.Types |
MISC functions
isPathArc :: PathCommand -> Bool Source #
Tell if the path command is an EllipticalArc.
isPathWithArc :: Foldable f => f PathCommand -> Bool Source #
Tell if a full path contain an EllipticalArc.
nameOfTree :: Tree -> Text Source #
For every element of a svg tree, associate it's SVG tag name.
zipTree :: ([[Tree]] -> Tree) -> Tree -> Tree Source #
Map a tree while propagating context information. The function passed in parameter receive a list representing the the path used to go arrive to the current node.