| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Svg.Types
Contents
Description
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)
- | PathTree !Path
- | CircleTree !Circle
- | PolyLineTree !PolyLine
- | PolygonTree !Polygon
- | EllipseTree !Ellipse
- | LineTree !Line
- | RectangleTree !Rectangle
- | TextTree !(Maybe TextPath) !Text
- | ImageTree !Image
- | MeshGradientTree !MeshGradient
- 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_aqpq where
- document :: Lens' c_aqpq Document
- definitions :: Lens' c_aqpq (Map String Element)
- description :: Lens' c_aqpq String
- documentLocation :: Lens' c_aqpq FilePath
- elements :: Lens' c_aqpq [Tree]
- height :: Lens' c_aqpq (Maybe Number)
- styleRules :: Lens' c_aqpq [CssRule]
- viewBox :: Lens' c_aqpq (Maybe (Double, Double, Double, Double))
- width :: Lens' c_aqpq (Maybe Number)
- 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)
- class HasDrawAttributes a where
- drawAttributes :: Lens' a DrawAttributes
- attrClass :: Lens' a [Text]
- attrId :: Lens' a (Maybe String)
- clipPathRef :: Lens' a (Last ElementRef)
- clipRule :: Lens' a (Last FillRule)
- fillColor :: Lens' a (Last Texture)
- fillOpacity :: Lens' a (Maybe Float)
- fillRule :: Lens' a (Last FillRule)
- fontFamily :: Lens' a (Last [String])
- fontSize :: Lens' a (Last Number)
- fontStyle :: Lens' a (Last FontStyle)
- groupOpacity :: Lens' a (Maybe Float)
- markerEnd :: Lens' a (Last ElementRef)
- markerMid :: Lens' a (Last ElementRef)
- markerStart :: Lens' a (Last ElementRef)
- maskRef :: Lens' a (Last ElementRef)
- strokeColor :: Lens' a (Last Texture)
- strokeDashArray :: Lens' a (Last [Number])
- strokeLineCap :: Lens' a (Last Cap)
- strokeLineJoin :: Lens' a (Last LineJoin)
- strokeMiterLimit :: Lens' a (Last Double)
- strokeOffset :: Lens' a (Last Number)
- strokeOpacity :: Lens' a (Maybe Float)
- strokeWidth :: Lens' a (Last Number)
- textAnchor :: Lens' a (Last TextAnchor)
- transform :: Lens' a (Maybe [Transformation])
- class WithDrawAttributes a where
- drawAttr :: Lens' a DrawAttributes
- data Rectangle = Rectangle {}
- class HasRectangle a where
- rectangle :: Lens' a Rectangle
- rectCornerRadius :: Lens' a (Number, Number)
- rectDrawAttributes :: Lens' a DrawAttributes
- rectHeight :: Lens' a Number
- rectUpperLeftCorner :: Lens' a Point
- rectWidth :: Lens' a 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)
- 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_aojU where
- textPath :: Lens' c_aojU TextPath
- textPathData :: Lens' c_aojU [PathCommand]
- textPathMethod :: Lens' c_aojU TextPathMethod
- textPathName :: Lens' c_aojU String
- textPathSpacing :: Lens' c_aojU TextPathSpacing
- textPathStartOffset :: Lens' c_aojU Number
- 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
- 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 {}
- class HasRadialGradient c_apwt where
- radialGradient :: Lens' c_apwt RadialGradient
- 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.
Constructors
| OriginAbsolute | Next point in absolute coordinate |
| OriginRelative | Next point relative to the previous |
data PathCommand #
Path command definition.
Constructors
| 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 # | |
Defined in Graphics.Svg.Types | |
| Show PathCommand # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> PathCommand -> ShowS # show :: PathCommand -> String # showList :: [PathCommand] -> ShowS # | |
data Transformation #
Describe the content of the transformation attribute.
see _transform and transform.
Constructors
| 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 # | |
Defined in Graphics.Svg.Types Methods (==) :: Transformation -> Transformation -> Bool # (/=) :: Transformation -> Transformation -> Bool # | |
| Show Transformation # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> Transformation -> ShowS # show :: Transformation -> String # showList :: [Transformation] -> ShowS # | |
data ElementRef #
Correspond to the possible values of the
the attributes which are either none or
`url(#elem)`
Instances
| Eq ElementRef # | |
Defined in Graphics.Svg.Types | |
| Show ElementRef # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> ElementRef -> ShowS # show :: ElementRef -> String # showList :: [ElementRef] -> ShowS # | |
data CoordinateUnits #
Define the possible values of various *units attributes used in the definition of the gradients and masks.
Constructors
| CoordUserSpace |
|
| CoordBoundingBox |
|
Instances
| Eq CoordinateUnits # | |
Defined in Graphics.Svg.Types Methods (==) :: CoordinateUnits -> CoordinateUnits -> Bool # (/=) :: CoordinateUnits -> CoordinateUnits -> Bool # | |
| Show CoordinateUnits # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> CoordinateUnits -> ShowS # show :: CoordinateUnits -> String # showList :: [CoordinateUnits] -> ShowS # | |
Building helpers
serializeNumber :: Number -> String #
Encode the number to string which can be used in a CSS or a svg attributes.
serializeTransformation :: Transformation -> String #
Convert the Transformation to a string which can be directly used in a svg attributes.
serializeTransformations :: [Transformation] -> String #
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.
Constructors
| None | |
| UseTree | |
Fields
| |
| GroupTree !(Group Tree) | |
| SymbolTree !(Symbol Tree) | |
| PathTree !Path | |
| CircleTree !Circle | |
| PolyLineTree !PolyLine | |
| PolygonTree !Polygon | |
| EllipseTree !Ellipse | |
| LineTree !Line | |
| RectangleTree !Rectangle | |
| TextTree !(Maybe TextPath) !Text | |
| ImageTree !Image | |
| MeshGradientTree !MeshGradient | |
Instances
| Eq Tree # | |
| Show Tree # | |
| CssMatcheable Tree # | |
| WithDefaultSvg Tree # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Tree # | |
| WithDrawAttributes Tree # | |
Defined in Graphics.Svg.Types Methods | |
Encode complex number possibly dependant to the current render size.
Constructors
| 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.
Constructors
| SpreadRepeat |
|
| SpreadPad |
|
| SpreadReflect | `reflect value` |
Describe the different value which can be used
in the fill or stroke attributes.
Constructors
| 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.
Constructors
| FillEvenOdd | Correspond to the |
| FillNonZero | Correspond to the |
Classify the font style, used to search a matching font in the FontCache.
Constructors
| FontStyleNormal | |
| FontStyleItalic | |
| FontStyleOblique |
Alias describing a "dot per inch" information used for size calculation (see toUserUnit).
class WithDefaultSvg a where #
Define an empty 'default' element for the SVG tree. It is used as base when parsing the element from XML.
Instances
Main type
Represent a full svg document with style, geometry and named elements.
Constructors
| Document | |
Instances
| Show Document # | |
| HasDocument Document # | |
Defined in Graphics.Svg.Types Methods document :: Lens' Document Document # definitions :: Lens' Document (Map String Element) # description :: Lens' Document String # documentLocation :: Lens' Document FilePath # elements :: Lens' Document [Tree] # height :: Lens' Document (Maybe Number) # styleRules :: Lens' Document [CssRule] # viewBox :: Lens' Document (Maybe (Double, Double, Double, Double)) # | |
class HasDocument c_aqpq where #
Lenses associated to a SVG document.
Minimal complete definition
Methods
document :: Lens' c_aqpq Document #
definitions :: Lens' c_aqpq (Map String Element) #
description :: Lens' c_aqpq String #
documentLocation :: Lens' c_aqpq FilePath #
elements :: Lens' c_aqpq [Tree] #
height :: Lens' c_aqpq (Maybe Number) #
styleRules :: Lens' c_aqpq [CssRule] #
viewBox :: Lens' c_aqpq (Maybe (Double, Double, Double, Double)) #
Instances
| HasDocument Document # | |
Defined in Graphics.Svg.Types Methods document :: Lens' Document Document # definitions :: Lens' Document (Map String Element) # description :: Lens' Document String # documentLocation :: Lens' Document FilePath # elements :: Lens' Document [Tree] # height :: Lens' Document (Maybe Number) # styleRules :: Lens' Document [CssRule] # viewBox :: Lens' Document (Maybe (Double, Double, Double, Double)) # | |
documentSize :: Dpi -> Document -> (Int, Int) #
Calculate the document size in function of the different available attributes in the document.
Drawing attributes
data DrawAttributes #
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.
Constructors
| DrawAttributes | |
Fields
| |
Instances
class HasDrawAttributes a where #
Lenses for the DrawAttributes type.
Minimal complete definition
Methods
drawAttributes :: Lens' a DrawAttributes #
attrId :: Lens' a (Maybe String) #
clipPathRef :: Lens' a (Last ElementRef) #
clipRule :: Lens' a (Last FillRule) #
fillColor :: Lens' a (Last Texture) #
fillOpacity :: Lens' a (Maybe Float) #
fillRule :: Lens' a (Last FillRule) #
fontFamily :: Lens' a (Last [String]) #
fontSize :: Lens' a (Last Number) #
fontStyle :: Lens' a (Last FontStyle) #
groupOpacity :: Lens' a (Maybe Float) #
markerEnd :: Lens' a (Last ElementRef) #
markerMid :: Lens' a (Last ElementRef) #
markerStart :: Lens' a (Last ElementRef) #
maskRef :: Lens' a (Last ElementRef) #
strokeColor :: Lens' a (Last Texture) #
strokeDashArray :: Lens' a (Last [Number]) #
strokeLineCap :: Lens' a (Last Cap) #
strokeLineJoin :: Lens' a (Last LineJoin) #
strokeMiterLimit :: Lens' a (Last Double) #
strokeOffset :: Lens' a (Last Number) #
strokeOpacity :: Lens' a (Maybe Float) #
strokeWidth :: Lens' a (Last Number) #
textAnchor :: Lens' a (Last TextAnchor) #
transform :: Lens' a (Maybe [Transformation]) #
Instances
class WithDrawAttributes a where #
Class helping find the drawing attributes for all the SVG attributes.
Instances
SVG drawing primitives
Rectangle
Define a rectangle. Correspond to `<rectangle>` svg tag.
Constructors
| Rectangle | |
Fields
| |
Instances
| Eq Rectangle # | |
| Show Rectangle # | |
| HasRectangle Rectangle # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg Rectangle # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Rectangle # | |
| WithDrawAttributes Rectangle # | |
Defined in Graphics.Svg.Types Methods | |
class HasRectangle a where #
Lenses for the Rectangle type.
Minimal complete definition
Methods
rectangle :: Lens' a Rectangle #
rectCornerRadius :: Lens' a (Number, Number) #
rectDrawAttributes :: Lens' a DrawAttributes #
rectHeight :: Lens' a Number #
rectUpperLeftCorner :: Lens' a Point #
Instances
| HasRectangle Rectangle # | |
Defined in Graphics.Svg.Types | |
Line
Define a simple line. Correspond to the `<line>` tag.
Constructors
| Line | |
Fields
| |
Instances
| Eq Line # | |
| Show Line # | |
| HasLine Line # | |
Defined in Graphics.Svg.Types Methods lineDrawAttributes :: Lens' Line DrawAttributes # linePoint1 :: Lens' Line Point # linePoint2 :: Lens' Line Point # | |
| WithDefaultSvg Line # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Line # | |
| WithDrawAttributes Line # | |
Defined in Graphics.Svg.Types Methods | |
Lenses for the Line type.
Minimal complete definition
Methods
lineDrawAttributes :: Lens' a DrawAttributes #
linePoint1 :: Lens' a Point #
linePoint2 :: Lens' a Point #
Instances
| HasLine Line # | |
Defined in Graphics.Svg.Types Methods lineDrawAttributes :: Lens' Line DrawAttributes # linePoint1 :: Lens' Line Point # linePoint2 :: Lens' Line Point # | |
Polygon
Primitive decriving polygon composed of segements. Correspond to the `<polygon>` tag
Constructors
| Polygon | |
Fields
| |
Instances
| Eq Polygon # | |
| Show Polygon # | |
| HasPolygon Polygon # | |
Defined in Graphics.Svg.Types Methods polygon :: Lens' Polygon Polygon # polygonDrawAttributes :: Lens' Polygon DrawAttributes # polygonPoints :: Lens' Polygon [RPoint] # | |
| WithDefaultSvg Polygon # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Polygon # | |
| WithDrawAttributes Polygon # | |
Defined in Graphics.Svg.Types Methods | |
class HasPolygon a where #
Lenses for the Polygon type
Minimal complete definition
Instances
| HasPolygon Polygon # | |
Defined in Graphics.Svg.Types Methods polygon :: Lens' Polygon Polygon # polygonDrawAttributes :: Lens' Polygon DrawAttributes # polygonPoints :: Lens' Polygon [RPoint] # | |
Polyline
This primitive describe an unclosed suite of segments. Correspond to the `<polyline>` tag.
Constructors
| PolyLine | |
Fields
| |
Instances
| Eq PolyLine # | |
| Show PolyLine # | |
| HasPolyLine PolyLine # | |
Defined in Graphics.Svg.Types Methods polyLine :: Lens' PolyLine PolyLine # polyLineDrawAttributes :: Lens' PolyLine DrawAttributes # polyLinePoints :: Lens' PolyLine [RPoint] # | |
| WithDefaultSvg PolyLine # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: PolyLine # | |
| WithDrawAttributes PolyLine # | |
Defined in Graphics.Svg.Types Methods | |
class HasPolyLine a where #
Lenses for the PolyLine type.
Minimal complete definition
Methods
polyLine :: Lens' a PolyLine #
polyLineDrawAttributes :: Lens' a DrawAttributes #
polyLinePoints :: Lens' a [RPoint] #
Instances
| HasPolyLine PolyLine # | |
Defined in Graphics.Svg.Types Methods polyLine :: Lens' PolyLine PolyLine # polyLineDrawAttributes :: Lens' PolyLine DrawAttributes # polyLinePoints :: Lens' PolyLine [RPoint] # | |
Path
Type mapping the `<path>` svg tag.
Constructors
| Path | |
Fields
| |
Instances
| Eq Path # | |
| Show Path # | |
| HasPath Path # | |
Defined in Graphics.Svg.Types Methods pathDefinition :: Lens' Path [PathCommand] # | |
| WithDefaultSvg Path # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Path # | |
| WithDrawAttributes Path # | |
Defined in Graphics.Svg.Types Methods | |
Lenses for the Path type
Minimal complete definition
Methods
pathDefinition :: Lens' c_alhy [PathCommand] #
pathDrawAttributes :: Lens' c_alhy DrawAttributes #
Instances
| HasPath Path # | |
Defined in Graphics.Svg.Types Methods pathDefinition :: Lens' Path [PathCommand] # | |
Circle
Define a `<circle>`.
Constructors
| Circle | |
Fields
| |
Instances
| Eq Circle # | |
| Show Circle # | |
| HasCircle Circle # | |
Defined in Graphics.Svg.Types Methods circle :: Lens' Circle Circle # circleCenter :: Lens' Circle Point # | |
| WithDefaultSvg Circle # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Circle # | |
| WithDrawAttributes Circle # | |
Defined in Graphics.Svg.Types Methods | |
Lenses for the Circle type.
Minimal complete definition
Methods
circleCenter :: Lens' a Point #
circleDrawAttributes :: Lens' a DrawAttributes #
circleRadius :: Lens' a Number #
Instances
| HasCircle Circle # | |
Defined in Graphics.Svg.Types Methods circle :: Lens' Circle Circle # circleCenter :: Lens' Circle Point # | |
Ellipse
Define an `<ellipse>`
Constructors
| Ellipse | |
Fields
| |
Instances
| Eq Ellipse # | |
| Show Ellipse # | |
| HasEllipse Ellipse # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg Ellipse # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Ellipse # | |
| WithDrawAttributes Ellipse # | |
Defined in Graphics.Svg.Types Methods | |
class HasEllipse c_amWt where #
Lenses for the ellipse type.
Minimal complete definition
Methods
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 #
Instances
| HasEllipse Ellipse # | |
Defined in Graphics.Svg.Types | |
Mesh (gradient mesh)
data GradientPathCommand #
Description of path used in meshgradient tag
Constructors
| GLine !Origin !(Maybe RPoint) | Line to, |
| GCurve !Origin !RPoint !RPoint !(Maybe RPoint) | Cubic bezier, |
| GClose |
|
Instances
| Eq GradientPathCommand # | |
Defined in Graphics.Svg.Types Methods (==) :: GradientPathCommand -> GradientPathCommand -> Bool # (/=) :: GradientPathCommand -> GradientPathCommand -> Bool # | |
| Show GradientPathCommand # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> GradientPathCommand -> ShowS # show :: GradientPathCommand -> String # showList :: [GradientPathCommand] -> ShowS # | |
data MeshGradientType #
Constructors
| GradientBilinear | |
| GradientBicubic |
Instances
| Eq MeshGradientType # | |
Defined in Graphics.Svg.Types Methods (==) :: MeshGradientType -> MeshGradientType -> Bool # (/=) :: MeshGradientType -> MeshGradientType -> Bool # | |
| Show MeshGradientType # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> MeshGradientType -> ShowS # show :: MeshGradientType -> String # showList :: [MeshGradientType] -> ShowS # | |
data MeshGradient #
Define a `<meshgradient>` tag.
Constructors
| MeshGradient | |
Fields
| |
Instances
| Eq MeshGradient # | |
Defined in Graphics.Svg.Types | |
| Show MeshGradient # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> MeshGradient -> ShowS # show :: MeshGradient -> String # showList :: [MeshGradient] -> ShowS # | |
| HasMeshGradient MeshGradient # | |
Defined in Graphics.Svg.Types Methods meshGradient :: Lens' MeshGradient MeshGradient # meshGradientDrawAttributes :: Lens' MeshGradient DrawAttributes # meshGradientRows :: Lens' MeshGradient [MeshGradientRow] # meshGradientTransform :: Lens' MeshGradient [Transformation] # meshGradientType :: Lens' MeshGradient MeshGradientType # meshGradientUnits :: Lens' MeshGradient CoordinateUnits # | |
| WithDefaultSvg MeshGradient # | |
Defined in Graphics.Svg.Types Methods | |
| WithDrawAttributes MeshGradient # | |
Defined in Graphics.Svg.Types Methods | |
class HasMeshGradient c_anxG where #
Minimal complete definition
Methods
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 #
Instances
data MeshGradientRow #
Define a `<meshrow>` tag.
Constructors
| MeshGradientRow | |
Fields
| |
Instances
| Eq MeshGradientRow # | |
Defined in Graphics.Svg.Types Methods (==) :: MeshGradientRow -> MeshGradientRow -> Bool # (/=) :: MeshGradientRow -> MeshGradientRow -> Bool # | |
| Show MeshGradientRow # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> MeshGradientRow -> ShowS # show :: MeshGradientRow -> String # showList :: [MeshGradientRow] -> ShowS # | |
| HasMeshGradientRow MeshGradientRow # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg MeshGradientRow # | |
Defined in Graphics.Svg.Types Methods | |
class HasMeshGradientRow c_antr where #
Minimal complete definition
Methods
meshGradientRow :: Lens' c_antr MeshGradientRow #
meshGradientRowPatches :: Lens' c_antr [MeshGradientPatch] #
Instances
| HasMeshGradientRow MeshGradientRow # | |
Defined in Graphics.Svg.Types | |
data MeshGradientPatch #
Define `<meshpatch>` SVG tag
Constructors
| MeshGradientPatch | |
Fields
| |
Instances
| Eq MeshGradientPatch # | |
Defined in Graphics.Svg.Types Methods (==) :: MeshGradientPatch -> MeshGradientPatch -> Bool # (/=) :: MeshGradientPatch -> MeshGradientPatch -> Bool # | |
| Show MeshGradientPatch # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> MeshGradientPatch -> ShowS # show :: MeshGradientPatch -> String # showList :: [MeshGradientPatch] -> ShowS # | |
| HasMeshGradientPatch MeshGradientPatch # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg MeshGradientPatch # | |
Defined in Graphics.Svg.Types Methods | |
class HasMeshGradientPatch c_annx where #
Minimal complete definition
Methods
meshGradientPatch :: Lens' c_annx MeshGradientPatch #
meshGradientPatchStops :: Lens' c_annx [GradientStop] #
Instances
| HasMeshGradientPatch MeshGradientPatch # | |
Defined in Graphics.Svg.Types | |
Image
Define an `<image>` tag.
Constructors
| Image | |
Fields
| |
Instances
| Eq Image # | |
| Show Image # | |
| HasImage Image # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg Image # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Image # | |
| WithDrawAttributes Image # | |
Defined in Graphics.Svg.Types Methods | |
Lenses for the Image type.
Minimal complete definition
Methods
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 #
Instances
| HasImage Image # | |
Defined in Graphics.Svg.Types | |
Use
Define an `<use>` for a named content. Every named content can be reused in the document using this element.
Constructors
| Use | |
Fields
| |
Instances
| Eq Use # | |
| Show Use # | |
| HasUse Use # | |
| WithDefaultSvg Use # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Use # | |
| WithDrawAttributes Use # | |
Defined in Graphics.Svg.Types Methods | |
Lenses for the Use type.
Minimal complete definition
Grouping primitives
Group
Define a SVG group, corresponding `<g>` tag.
Constructors
| Group | |
Fields
| |
Instances
| Eq a => Eq (Group a) # | |
| Show a => Show (Group a) # | |
| WithDefaultSvg (Group a) # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Group a # | |
| WithDrawAttributes (Group a) # | |
Defined in Graphics.Svg.Types Methods drawAttr :: Lens' (Group a) DrawAttributes # | |
| HasGroup (Group a) a # | |
Defined in Graphics.Svg.Types Methods group :: Lens' (Group a) (Group a) # groupAspectRatio :: Lens' (Group a) PreserveAspectRatio # groupChildren :: Lens' (Group a) [a] # groupDrawAttributes :: Lens' (Group a) DrawAttributes # groupViewBox :: Lens' (Group a) (Maybe (Double, Double, Double, Double)) # | |
class HasGroup g a | g -> a where #
Lenses associated to the Group type.
Minimal complete definition
Methods
groupAspectRatio :: Lens' g PreserveAspectRatio #
groupChildren :: Lens' g [a] #
groupDrawAttributes :: Lens' g DrawAttributes #
groupViewBox :: Lens' g (Maybe (Double, Double, Double, Double)) #
Instances
| HasGroup (Group a) a # | |
Defined in Graphics.Svg.Types Methods group :: Lens' (Group a) (Group a) # groupAspectRatio :: Lens' (Group a) PreserveAspectRatio # groupChildren :: Lens' (Group a) [a] # groupDrawAttributes :: Lens' (Group a) DrawAttributes # groupViewBox :: Lens' (Group a) (Maybe (Double, Double, Double, Double)) # | |
Symbol
Define the `<symbol>` tag, equivalent to a named group.
Constructors
| Symbol | |
Fields
| |
Instances
| Eq a => Eq (Symbol a) # | |
| Show a => Show (Symbol a) # | |
| WithDefaultSvg (Symbol a) # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Symbol a # | |
| WithDrawAttributes (Symbol a) # | |
Defined in Graphics.Svg.Types Methods drawAttr :: Lens' (Symbol a) DrawAttributes # | |
groupOfSymbol :: Lens (Symbol s) (Symbol t) (Group s) (Group t) #
Lenses associated with the Symbol type.
Text related types
Text
Define the global `<tag>` SVG tag.
Constructors
| Text | |
Fields
| |
Instances
| Eq Text # | |
| Show Text # | |
| HasText Text # | |
| WithDefaultSvg Text # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Text # | |
| WithDrawAttributes Text # | |
Defined in Graphics.Svg.Types Methods | |
data TextAnchor #
Tell where to anchor the text, where the position given is realative to the text.
Constructors
| 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 # | |
Defined in Graphics.Svg.Types | |
| Show TextAnchor # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> TextAnchor -> ShowS # show :: TextAnchor -> String # showList :: [TextAnchor] -> ShowS # | |
Text path
Describe the `<textpath>` SVG tag.
Constructors
| TextPath | |
Fields
| |
Instances
| Eq TextPath # | |
| Show TextPath # | |
| HasTextPath TextPath # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg TextPath # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: TextPath # | |
class HasTextPath c_aojU where #
Lenses for the TextPath type.
Minimal complete definition
Methods
textPath :: Lens' c_aojU TextPath #
textPathData :: Lens' c_aojU [PathCommand] #
textPathMethod :: Lens' c_aojU TextPathMethod #
textPathName :: Lens' c_aojU String #
textPathSpacing :: Lens' c_aojU TextPathSpacing #
textPathStartOffset :: Lens' c_aojU Number #
Instances
| HasTextPath TextPath # | |
Defined in Graphics.Svg.Types | |
data TextPathSpacing #
Describe the content of the spacing text path
attribute.
Constructors
| TextPathSpacingExact | Map to the |
| TextPathSpacingAuto | Map to the |
Instances
| Eq TextPathSpacing # | |
Defined in Graphics.Svg.Types Methods (==) :: TextPathSpacing -> TextPathSpacing -> Bool # (/=) :: TextPathSpacing -> TextPathSpacing -> Bool # | |
| Show TextPathSpacing # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> TextPathSpacing -> ShowS # show :: TextPathSpacing -> String # showList :: [TextPathSpacing] -> ShowS # | |
data TextPathMethod #
Describe the content of the method attribute on
text path.
Constructors
| TextPathAlign | Map to the |
| TextPathStretch | Map to the |
Instances
| Eq TextPathMethod # | |
Defined in Graphics.Svg.Types Methods (==) :: TextPathMethod -> TextPathMethod -> Bool # (/=) :: TextPathMethod -> TextPathMethod -> Bool # | |
| Show TextPathMethod # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> TextPathMethod -> ShowS # show :: TextPathMethod -> String # showList :: [TextPathMethod] -> ShowS # | |
Text span.
data TextSpanContent #
Define the content of a `<tspan>` tag.
Constructors
| SpanText !Text | Raw text |
| SpanTextRef !String | Equivalent to a `<tref>` |
| SpanSub !TextSpan | Define a `<tspan>` |
Instances
| Eq TextSpanContent # | |
Defined in Graphics.Svg.Types Methods (==) :: TextSpanContent -> TextSpanContent -> Bool # (/=) :: TextSpanContent -> TextSpanContent -> Bool # | |
| Show TextSpanContent # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> TextSpanContent -> ShowS # show :: TextSpanContent -> String # showList :: [TextSpanContent] -> ShowS # | |
Define a `<tspan>` tag.
Constructors
| TextSpan | |
Fields
| |
Instances
| Eq TextSpan # | |
| Show TextSpan # | |
| HasTextSpan TextSpan # | |
Defined in Graphics.Svg.Types Methods textSpan :: Lens' TextSpan TextSpan # spanContent :: Lens' TextSpan [TextSpanContent] # | |
| WithDefaultSvg TextSpan # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: TextSpan # | |
class HasTextSpan c_aobD where #
Lenses for the TextSpan type.
Minimal complete definition
Methods
textSpan :: Lens' c_aobD TextSpan #
spanContent :: Lens' c_aobD [TextSpanContent] #
spanDrawAttributes :: Lens' c_aobD DrawAttributes #
Instances
| HasTextSpan TextSpan # | |
Defined in Graphics.Svg.Types Methods textSpan :: Lens' TextSpan TextSpan # spanContent :: Lens' TextSpan [TextSpanContent] # | |
Define position information associated to `<text>` or `<tspan>` svg tag.
Constructors
| TextInfo | |
Fields
| |
Instances
| Eq TextInfo # | |
| Show TextInfo # | |
| Semigroup TextInfo # | |
| Monoid TextInfo # | |
| HasTextInfo TextInfo # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg TextInfo # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: TextInfo # | |
class HasTextInfo c_ao0m where #
Lenses for the TextInfo type.
Minimal complete definition
Methods
textInfo :: Lens' c_ao0m TextInfo #
textInfoDX :: Lens' c_ao0m [Number] #
textInfoDY :: Lens' c_ao0m [Number] #
textInfoLength :: Lens' c_ao0m (Maybe Number) #
textInfoRotate :: Lens' c_ao0m [Double] #
Instances
| HasTextInfo TextInfo # | |
Defined in Graphics.Svg.Types | |
data TextAdjust #
Define the possible values of the lengthAdjust
attribute.
Constructors
| TextAdjustSpacing | Value |
| TextAdjustSpacingAndGlyphs | Value |
Instances
| Eq TextAdjust # | |
Defined in Graphics.Svg.Types | |
| Show TextAdjust # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> TextAdjust -> ShowS # show :: TextAdjust -> String # showList :: [TextAdjust] -> ShowS # | |
Marker definition
Define the `<marker>` tag.
Constructors
| Marker | |
Fields
| |
Instances
| Eq Marker # | |
| Show Marker # | |
| HasMarker Marker # | |
Defined in Graphics.Svg.Types Methods marker :: Lens' Marker Marker # markerAspectRatio :: Lens' Marker PreserveAspectRatio # markerDrawAttributes :: Lens' Marker DrawAttributes # markerElements :: Lens' Marker [Tree] # markerHeight :: Lens' Marker (Maybe Number) # markerOrient :: Lens' Marker (Maybe MarkerOrientation) # markerOverflow :: Lens' Marker (Maybe Overflow) # markerRefPoint :: Lens' Marker (Number, Number) # markerUnits :: Lens' Marker (Maybe MarkerUnit) # markerViewBox :: Lens' Marker (Maybe (Double, Double, Double, Double)) # | |
| WithDefaultSvg Marker # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Marker # | |
| WithDrawAttributes Marker # | |
Defined in Graphics.Svg.Types Methods | |
Define the content of the markerUnits attribute
on the Marker.
Constructors
| OverflowVisible | Value |
| OverflowHidden | Value |
data MarkerOrientation #
Define the orientation, associated to the
orient attribute on the Marker
Constructors
| OrientationAuto | Auto value |
| OrientationAngle Coord | Specific angle. |
Instances
| Eq MarkerOrientation # | |
Defined in Graphics.Svg.Types Methods (==) :: MarkerOrientation -> MarkerOrientation -> Bool # (/=) :: MarkerOrientation -> MarkerOrientation -> Bool # | |
| Show MarkerOrientation # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> MarkerOrientation -> ShowS # show :: MarkerOrientation -> String # showList :: [MarkerOrientation] -> ShowS # | |
data MarkerUnit #
Define the content of the markerUnits attribute
on the Marker.
Constructors
| MarkerUnitStrokeWidth | Value |
| MarkerUnitUserSpaceOnUse | Value |
Instances
| Eq MarkerUnit # | |
Defined in Graphics.Svg.Types | |
| Show MarkerUnit # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> MarkerUnit -> ShowS # show :: MarkerUnit -> String # showList :: [MarkerUnit] -> ShowS # | |
class HasMarker c_aoKc where #
Lenses for the Marker type.
Minimal complete definition
Methods
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) #
Instances
| HasMarker Marker # | |
Defined in Graphics.Svg.Types Methods marker :: Lens' Marker Marker # markerAspectRatio :: Lens' Marker PreserveAspectRatio # markerDrawAttributes :: Lens' Marker DrawAttributes # markerElements :: Lens' Marker [Tree] # markerHeight :: Lens' Marker (Maybe Number) # markerOrient :: Lens' Marker (Maybe MarkerOrientation) # markerOverflow :: Lens' Marker (Maybe Overflow) # markerRefPoint :: Lens' Marker (Number, Number) # markerUnits :: Lens' Marker (Maybe MarkerUnit) # markerViewBox :: Lens' Marker (Maybe (Double, Double, Double, Double)) # | |
Gradient definition
data GradientStop #
Define a color stop for the gradients. Represent the `<stop>` SVG tag.
Constructors
| GradientStop | |
Fields
| |
Instances
| Eq GradientStop # | |
Defined in Graphics.Svg.Types | |
| Show GradientStop # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> GradientStop -> ShowS # show :: GradientStop -> String # showList :: [GradientStop] -> ShowS # | |
| HasGradientStop GradientStop # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg GradientStop # | |
Defined in Graphics.Svg.Types Methods | |
class HasGradientStop c_anhM where #
Lenses for the GradientStop type.
Minimal complete definition
Methods
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) #
Instances
| HasGradientStop GradientStop # | |
Defined in Graphics.Svg.Types | |
Linear Gradient
data LinearGradient #
Define a `<linearGradient>` tag.
Constructors
| LinearGradient | |
Fields
| |
Instances
| Eq LinearGradient # | |
Defined in Graphics.Svg.Types Methods (==) :: LinearGradient -> LinearGradient -> Bool # (/=) :: LinearGradient -> LinearGradient -> Bool # | |
| Show LinearGradient # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> LinearGradient -> ShowS # show :: LinearGradient -> String # showList :: [LinearGradient] -> ShowS # | |
| HasLinearGradient LinearGradient # | |
Defined in Graphics.Svg.Types Methods linearGradient :: Lens' LinearGradient LinearGradient # linearGradientSpread :: Lens' LinearGradient Spread # linearGradientStart :: Lens' LinearGradient Point # linearGradientStop :: Lens' LinearGradient Point # linearGradientStops :: Lens' LinearGradient [GradientStop] # linearGradientTransform :: Lens' LinearGradient [Transformation] # linearGradientUnits :: Lens' LinearGradient CoordinateUnits # | |
| WithDefaultSvg LinearGradient # | |
Defined in Graphics.Svg.Types Methods | |
class HasLinearGradient c_apmJ where #
Lenses for the LinearGradient type.
Minimal complete definition
Methods
linearGradient :: Lens' c_apmJ LinearGradient #
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 #
Instances
Radial Gradient
data RadialGradient #
Define a `<radialGradient>` tag.
Constructors
| RadialGradient | |
Fields
| |
Instances
class HasRadialGradient c_apwt where #
Lenses for the RadialGradient type.
Minimal complete definition
Methods
radialGradient :: Lens' c_apwt RadialGradient #
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 #
Instances
Pattern definition
Define a `<pattern>` tag.
Constructors
| Pattern | |
Fields
| |
Instances
| Show Pattern # | |
| HasPattern Pattern # | |
Defined in Graphics.Svg.Types Methods pattern :: Lens' Pattern Pattern # patternAspectRatio :: Lens' Pattern PreserveAspectRatio # patternDrawAttributes :: Lens' Pattern DrawAttributes # patternElements :: Lens' Pattern [Tree] # patternHeight :: Lens' Pattern Number # patternHref :: Lens' Pattern String # patternPos :: Lens' Pattern Point # patternTransform :: Lens' Pattern (Maybe [Transformation]) # patternUnit :: Lens' Pattern CoordinateUnits # patternViewBox :: Lens' Pattern (Maybe (Double, Double, Double, Double)) # | |
| WithDefaultSvg Pattern # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Pattern # | |
| WithDrawAttributes Pattern # | |
Defined in Graphics.Svg.Types Methods | |
class HasPattern c_aq6G where #
Lenses for the Patter type.
Minimal complete definition
Methods
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 #
Instances
| HasPattern Pattern # | |
Defined in Graphics.Svg.Types Methods pattern :: Lens' Pattern Pattern # patternAspectRatio :: Lens' Pattern PreserveAspectRatio # patternDrawAttributes :: Lens' Pattern DrawAttributes # patternElements :: Lens' Pattern [Tree] # patternHeight :: Lens' Pattern Number # patternHref :: Lens' Pattern String # patternPos :: Lens' Pattern Point # patternTransform :: Lens' Pattern (Maybe [Transformation]) # patternUnit :: Lens' Pattern CoordinateUnits # patternViewBox :: Lens' Pattern (Maybe (Double, Double, Double, Double)) # | |
Mask definition
Define a SVG `<mask>` tag.
Constructors
| Mask | |
Fields
| |
Instances
| Eq Mask # | |
| Show Mask # | |
| HasMask Mask # | |
Defined in Graphics.Svg.Types Methods maskContent :: Lens' Mask [Tree] # maskContentUnits :: Lens' Mask CoordinateUnits # maskDrawAttributes :: Lens' Mask DrawAttributes # maskHeight :: Lens' Mask Number # maskPosition :: Lens' Mask Point # | |
| WithDefaultSvg Mask # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: Mask # | |
| WithDrawAttributes Mask # | |
Defined in Graphics.Svg.Types Methods | |
Lenses for the Mask type.
Minimal complete definition
Methods
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 #
Instances
| HasMask Mask # | |
Defined in Graphics.Svg.Types Methods maskContent :: Lens' Mask [Tree] # maskContentUnits :: Lens' Mask CoordinateUnits # maskDrawAttributes :: Lens' Mask DrawAttributes # maskHeight :: Lens' Mask Number # maskPosition :: Lens' Mask Point # | |
Clip path definition
Define a `<clipPath>` tag.
Constructors
| ClipPath | |
Fields
| |
Instances
| Eq ClipPath # | |
| Show ClipPath # | |
| HasClipPath ClipPath # | |
Defined in Graphics.Svg.Types | |
| WithDefaultSvg ClipPath # | |
Defined in Graphics.Svg.Types Methods defaultSvg :: ClipPath # | |
| WithDrawAttributes ClipPath # | |
Defined in Graphics.Svg.Types Methods | |
class HasClipPath c_apZq where #
Lenses for the ClipPath type.
Minimal complete definition
Methods
clipPath :: Lens' c_apZq ClipPath #
clipPathContent :: Lens' c_apZq [Tree] #
clipPathDrawAttributes :: Lens' c_apZq DrawAttributes #
clipPathUnits :: Lens' c_apZq CoordinateUnits #
Instances
| HasClipPath ClipPath # | |
Defined in Graphics.Svg.Types | |
Aspect Ratio description
data PreserveAspectRatio #
Describe the content of the preserveAspectRatio attribute.
Constructors
| PreserveAspectRatio | |
Fields | |
Instances
| Eq PreserveAspectRatio # | |
Defined in Graphics.Svg.Types Methods (==) :: PreserveAspectRatio -> PreserveAspectRatio -> Bool # (/=) :: PreserveAspectRatio -> PreserveAspectRatio -> Bool # | |
| Show PreserveAspectRatio # | |
Defined in Graphics.Svg.Types Methods showsPrec :: Int -> PreserveAspectRatio -> ShowS # show :: PreserveAspectRatio -> String # showList :: [PreserveAspectRatio] -> ShowS # | |
| HasPreserveAspectRatio PreserveAspectRatio # | |
| WithDefaultSvg PreserveAspectRatio # | |
Defined in Graphics.Svg.Types Methods | |
This type represent the align information of the preserveAspectRatio SVGattribute
Constructors
| 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 #
Lenses for the PreserveAspectRatio type
Minimal complete definition
Methods
preserveAspectRatio :: Lens' a PreserveAspectRatio #
aspectRatioAlign :: Lens' a Alignment #
aspectRatioDefer :: Lens' a Bool #
aspectRatioMeetSlice :: Lens' a (Maybe MeetSlice) #
Instances
| HasPreserveAspectRatio PreserveAspectRatio # | |
MISC functions
isPathArc :: PathCommand -> Bool #
Tell if the path command is an EllipticalArc.
isPathWithArc :: Foldable f => f PathCommand -> Bool #
Tell if a full path contain an EllipticalArc.
nameOfTree :: Tree -> Text #
For every element of a svg tree, associate it's SVG tag name.
zipTree :: ([[Tree]] -> Tree) -> Tree -> Tree #
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.
toUserUnit :: Dpi -> Number -> Number #
This function replace all device dependant units to user units given it's DPI configuration. Preserve percentage and "em" notation.