Donner
C++20 SVG rendering library
|
Defines a paint server containing a repeated pattern, which is tiled to fill the area.
These elements are typically placed within a "<defs>" element, and then referenced by id from a fill
or stroke
attribute.
To reference it with a fill:
Attribute | Default | Description |
---|---|---|
viewBox | (none) | A list of four numbers (min-x, min-y, width, height) separated by whitespace and/or a comma, that specify a rectangle in userspace that should be mapped to the SVG viewport bounds established by the pattern. |
preserveAspectRatio | xMidYMid meet | How to scale the viewport to fit the content. Only applies is viewBox is specified. |
x | 0 | Defines the top-left X coordinate of a rectangle indicating how pattern tiles are placed and spread. The coordinate system is determined by the combination of the patternUnits and patternTransform attributes. |
y | 0 | Defines the top-left Y coordinate of a rectangle indicating how pattern tiles are placed and spread. The coordinate system is determined by the combination of the patternUnits and patternTransform attributes. |
width | 0 | Defines the width of a rectangle indicating how pattern tiles are placed and spread. The coordinate system is determined by the combination of the patternUnits and patternTransform attributes. |
height | 0 | Defines the height of a rectangle indicating how pattern tiles are placed and spread. The coordinate system is determined by the combination of the patternUnits and patternTransform attributes. |
patternUnits | objectBoundingBox | Defines the coordinate system for attributes x , y , width , and height . |
patternContentUnits | userSpaceOnUse | Defines the coordinate system for the contents of the pattern. Note that this attribute has no effect if the viewBox attribute is specified. |
patternTransform | identity | Optional transformation from the pattern coordinate system onto the target coordinate system, allowing things like skewing the pattern tiles. |
href | (none) | Reference to another pattern element to use as a template. |