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.
- 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
- data Document = Document {}
- class HasDocument c_aqpq 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)
- class HasDrawAttributes a where
- class WithDrawAttributes a where
- data Rectangle = Rectangle {}
- class HasRectangle a where
- data Line = Line {}
- class HasLine a where
- data Polygon = Polygon {}
- class HasPolygon a where
- data PolyLine = PolyLine {}
- class HasPolyLine a where
- data Path = Path {}
- class HasPath c_alhy where
- data Circle = Circle {}
- class HasCircle a where
- data Ellipse = Ellipse {}
- class HasEllipse c_amWt where
- data GradientPathCommand
- data MeshGradientType
- data MeshGradient = MeshGradient {}
- class HasMeshGradient c_anxG where
- data MeshGradientRow = MeshGradientRow {}
- class HasMeshGradientRow c_antr where
- data MeshGradientPatch = MeshGradientPatch {}
- class HasMeshGradientPatch c_annx where
- data Image = Image {}
- class HasImage c_anI7 where
- 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
- 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
- data TextAnchor
- textAt :: Point -> Text -> Text
- data TextPath = TextPath {}
- class HasTextPath c_aojU where
- data TextPathSpacing
- data TextPathMethod
- data TextSpanContent
- data TextSpan = TextSpan {}
- class HasTextSpan c_aobD where
- 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
- data GradientStop = GradientStop {}
- class HasGradientStop c_anhM where
- data LinearGradient = LinearGradient {}
- class HasLinearGradient c_apmJ where
- data RadialGradient = RadialGradient {}
- class HasRadialGradient c_apwt where
- 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
- data Mask = Mask {}
- class HasMask c_apHI where
- data ClipPath = ClipPath {}
- class HasClipPath c_apZq where
- 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, |
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. |
data ElementRef Source #
Correspond to the possible values of the
the attributes which are either none
or
`url(#elem)`
data CoordinateUnits Source #
Define the possible values of various *units attributes used in the definition of the gradients and masks.
CoordUserSpace |
|
CoordBoundingBox |
|
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.
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.
Main type
Represent a full svg document with style, geometry and named elements.
class HasDocument c_aqpq where Source #
Lenses associated to a SVG document.
document :: Lens' c_aqpq Document Source #
definitions :: Lens' c_aqpq (Map String Element) Source #
description :: Lens' c_aqpq String Source #
documentLocation :: Lens' c_aqpq FilePath Source #
elements :: Lens' c_aqpq [Tree] Source #
height :: Lens' c_aqpq (Maybe Number) Source #
styleRules :: Lens' c_aqpq [CssRule] Source #
viewBox :: Lens' c_aqpq (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 | |
|
class HasDrawAttributes a where Source #
Lenses for the DrawAttributes type.
drawAttributes :: Lens' a DrawAttributes Source #
attrClass :: Lens' a [Text] Source #
attrId :: Lens' a (Maybe String) Source #
clipPathRef :: Lens' a (Last ElementRef) Source #
clipRule :: Lens' a (Last FillRule) Source #
fillColor :: Lens' a (Last Texture) Source #
fillOpacity :: Lens' a (Maybe Float) Source #
fillRule :: Lens' a (Last FillRule) Source #
fontFamily :: Lens' a (Last [String]) Source #
fontSize :: Lens' a (Last Number) Source #
fontStyle :: Lens' a (Last FontStyle) Source #
groupOpacity :: Lens' a (Maybe Float) Source #
markerEnd :: Lens' a (Last ElementRef) Source #
markerMid :: Lens' a (Last ElementRef) Source #
markerStart :: Lens' a (Last ElementRef) Source #
maskRef :: Lens' a (Last ElementRef) Source #
strokeColor :: Lens' a (Last Texture) Source #
strokeDashArray :: Lens' a (Last [Number]) Source #
strokeLineCap :: Lens' a (Last Cap) Source #
strokeLineJoin :: Lens' a (Last LineJoin) Source #
strokeMiterLimit :: Lens' a (Last Double) Source #
strokeOffset :: Lens' a (Last Number) Source #
strokeOpacity :: Lens' a (Maybe Float) Source #
strokeWidth :: Lens' a (Last Number) Source #
textAnchor :: Lens' a (Last TextAnchor) Source #
class WithDrawAttributes a where Source #
Class helping find the drawing attributes for all the SVG attributes.
drawAttr :: Lens' a DrawAttributes Source #
Lens which can be used to read/write primitives.
SVG drawing primitives
Rectangle
Define a rectangle. Correspond to `<rectangle>` svg tag.
Rectangle | |
|
class HasRectangle a where Source #
Lenses for the Rectangle type.
Line
Define a simple line. Correspond to the `<line>` tag.
Line | |
|
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 | |
|
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 #
Polyline
This primitive describe an unclosed suite of segments. Correspond to the `<polyline>` tag.
PolyLine | |
|
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 #
Path
Type mapping the `<path>` svg tag.
Path | |
|
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 #
Circle
Define a `<circle>`.
Circle | |
|
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 | |
|
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 #
Mesh (gradient mesh)
data GradientPathCommand Source #
Description of path used in meshgradient tag
data MeshGradientType Source #
data MeshGradient Source #
Define a `<meshgradient>` tag.
MeshGradient | |
|
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 #
data MeshGradientRow Source #
Define a `<meshrow>` tag.
MeshGradientRow | |
|
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 | |
|
class HasMeshGradientPatch c_annx where Source #
meshGradientPatch :: Lens' c_annx MeshGradientPatch Source #
meshGradientPatchStops :: Lens' c_annx [GradientStop] Source #
Image
Define an `<image>` tag.
Image | |
|
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 #
Use
Define an `<use>` for a named content. Every named content can be reused in the document using this element.
Use | |
|
class HasUse c_anR3 where Source #
Lenses for the Use type.
Grouping primitives
Group
Define a SVG group, corresponding `<g>` tag.
Group | |
|
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 #
Symbol
Define the `<symbol>` tag, equivalent to a named group.
Symbol | |
|
groupOfSymbol :: Lens (Symbol s) (Symbol t) (Group s) (Group t) Source #
Lenses associated with the Symbol type.
Text related types
Text
Define the global `<tag>` SVG tag.
Text | |
|
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 |
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_aojU where Source #
Lenses for the TextPath type.
textPath :: Lens' c_aojU TextPath Source #
textPathData :: Lens' c_aojU [PathCommand] Source #
textPathMethod :: Lens' c_aojU TextPathMethod Source #
textPathName :: Lens' c_aojU String Source #
textPathSpacing :: Lens' c_aojU TextPathSpacing Source #
textPathStartOffset :: Lens' c_aojU Number Source #
data TextPathSpacing Source #
Describe the content of the spacing
text path
attribute.
TextPathSpacingExact | Map to the |
TextPathSpacingAuto | Map to the |
data TextPathMethod Source #
Describe the content of the method
attribute on
text path.
TextPathAlign | Map to the |
TextPathStretch | Map to the |
Text span.
data TextSpanContent Source #
Define the content of a `<tspan>` tag.
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 #
Define position information associated to `<text>` or `<tspan>` svg tag.
TextInfo | |
|
class HasTextInfo c_ao0m where Source #
Lenses for the TextInfo type.
data TextAdjust Source #
Define the possible values of the lengthAdjust
attribute.
TextAdjustSpacing | Value |
TextAdjustSpacingAndGlyphs | Value |
Marker definition
Define the `<marker>` tag.
Marker | |
|
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. |
data MarkerUnit Source #
Define the content of the markerUnits
attribute
on the Marker.
MarkerUnitStrokeWidth | Value |
MarkerUnitUserSpaceOnUse | Value |
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 #
Gradient definition
data GradientStop Source #
Define a color stop for the gradients. Represent the `<stop>` SVG tag.
GradientStop | |
|
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 #
Linear Gradient
data LinearGradient Source #
Define a `<linearGradient>` tag.
LinearGradient | |
|
class HasLinearGradient c_apmJ where Source #
Lenses for the LinearGradient type.
linearGradient :: Lens' c_apmJ LinearGradient 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 #
Radial Gradient
data RadialGradient Source #
Define a `<radialGradient>` tag.
RadialGradient | |
|
class HasRadialGradient c_apwt where Source #
Lenses for the RadialGradient type.
radialGradient :: Lens' c_apwt RadialGradient 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 #
Pattern definition
Define a `<pattern>` tag.
Pattern | |
|
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 #
Mask definition
Define a SVG `<mask>` tag.
Mask | |
|
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 #
Clip path definition
Define a `<clipPath>` tag.
ClipPath | |
|
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 #
Aspect Ratio description
data PreserveAspectRatio Source #
Describe the content of the preserveAspectRatio attribute.
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
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.