attr

package
v0.0.0-...-192c519 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accumulate

func Accumulate(mode string) svg.Attribute

Accumulate controls whether or not an animation is cumulative. Values: none | sum

func Additive

func Additive(mode string) svg.Attribute

Additive controls whether or not an animation is additive. Values: replace | sum

func Attribute

func Attribute(tag, value string) svg.Attribute

Attribute is for creating generic attributes not currently defined in the package

func AttributeName

func AttributeName(name string) svg.Attribute

AttributeName indicates the name of the CSS property or attribute of the target element that is going to be changed during an animation.

func Azimuth

func Azimuth(angle svg.Number) svg.Attribute

Azimuth specifies the direction angle for the light source on the XY plane (clockwise), in degrees from the x axis.

func BaseFrequency

func BaseFrequency(freq svg.Number) svg.Attribute

BaseFrequency represents the base frequency parameter for the noise function of the <feTurbulence> filter primitive.

func Begin

func Begin(time svg.Number) svg.Attribute

Begin defines when an animation should begin or when an element should be discarded. Defaults to seconds

func Bias

func Bias(number svg.Number) svg.Attribute

Bias shifts the range of the filter. After applying the kernelMatrix of the <feConvolveMatrix> element to the input image to

yield a number and applied the divisor attribute, the bias attribute is added to each component.

func By

func By(number svg.Number) svg.Attribute

By specifies a relative offset value for an attribute that will be modified during an animation.

func CalcMode

func CalcMode(mode string) svg.Attribute

CalcMode specifies the interpolation mode for the animation. Values: discrete | linear | paced | spline

func Class

func Class(class string) svg.Attribute

func ClipPath

func ClipPath(clipPath string) svg.Attribute

ClipPath defines a clipping path, to be used used by the clip-path property.

func ClipPathUnits

func ClipPathUnits(value string) svg.Attribute

ClipPathUnits indicates which coordinate system to use for the contents of the <clipPath> element. Values: userSpaceOnUse | objectBoundingBox

func ClipRule

func ClipRule(rule string) svg.Attribute

func Color

func Color(color string) svg.Attribute

func ColorInterpolation

func ColorInterpolation(colorInterpolation string) svg.Attribute

ColorInterpolation specifies the color space for gradient interpolations, color animations, and alpha compositing. Values: auto | sRGB | linearRGB Default: sRBG

func Cursor

func Cursor(cursor string) svg.Attribute

Cursor specifies the mouse cursor displayed when the mouse pointer is over an element Values: auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help

func Cx

func Cx(lengthOrPercent svg.LengthOrPercent) svg.Attribute

Cx is the x-axis coordinate of the center of the circle.

func Cy

func Cy(lengthOrPercent svg.LengthOrPercent) svg.Attribute

Cy is the y-axis coordinate of the center of the circle.

func D

func D(paths ...path.Cmd) svg.Attribute

D defines a path to be drawn.

func DiffuseConstant

func DiffuseConstant(kd svg.Number) svg.Attribute

DiffuseConstant represents the kd value in the Phong lighting model. In SVG, this can be any non-negative number.

func Display

func Display(display string) svg.Attribute

Display lets you control the rendering of graphical or container elements. Some of the Value: block | inline | run-in | flow | flow-root | table | flex | grid | ruby | contents | none | inline-block | inline-list-item | inline-table | inline-flex | inline-grid

func Divisor

func Divisor(number svg.Number) svg.Attribute

Divisor specifies the value by which the resulting number of applying the kernelMatrix of a <feConvolveMatrix>

element to the input image color value is divided to yield the destination color value.

func Dur

func Dur(time svg.Number) svg.Attribute

Dur indicates the simple duration of an animation. Defaults to seconds

func Dx

func Dx(value svg.Number) svg.Attribute

Dx indicates a shift along the x-axis on the position of an element or its content.

func Dy

func Dy(value svg.Number) svg.Attribute

Dy indicates a shift along the y-axis on the position of an element or its content.

func EdgeMode

func EdgeMode(mode string) svg.Attribute

EdgeMode determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image. Values: duplicate | wrap | none

func Elevation

func Elevation(angle svg.Number) svg.Attribute

Elevation specifies the direction angle for the light source from the XY plane towards the Z-axis, in degrees.

func End

func End(value svg.Number) svg.Attribute

End defines an end value for the animation that can constrain the active duration. Defaults to second, if not time pass in a string

func Fill

func Fill(fill string) svg.Attribute

Fill has two different meanings. For shapes and text it's a presentation attribute that defines the color (or any SVG paint servers like gradients or patterns) used to paint the element; for animation it defines the final state of the animation.

func FillOpacity

func FillOpacity(numberOrPercent svg.NumberOrPercent) svg.Attribute

FillOpacity is a presentation attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to a shape. Value: [0-1] | percentage

func FillRule

func FillRule(rule string) svg.Attribute

FillRule is a presentation attribute defining the algorithm to use to determine the inside part of a shape.

func Filter

func Filter(filter string) svg.Attribute

Filter attribute specifies the filter effects defined by the <filter> element that shall be applied to its element.

func FilterUnits

func FilterUnits(units string) svg.Attribute

FilterUnits defines the coordinate system for the attributes x, y, width and height. Values: userSpaceOnUse | objectBoundingBox

func FloodColor

func FloodColor(color string) svg.Attribute

FloodColor indicates what color to use to flood the current filter primitive subregion.

func FloodOpacity

func FloodOpacity(opacity svg.Number) svg.Attribute

FloodOpacity indicates the opacity value to use across the current filter primitive subregion.

func Fr

func Fr(length svg.Length) svg.Attribute

Fr defines the radius of the start circle of the radial gradient.

func From

func From(value svg.Number) svg.Attribute

From indicates the initial value of the attribute that will be modified during the animation.

func Fx

func Fx(length svg.Length) svg.Attribute

Fx defines the x coordinate of the start circle of the radial gradient.

func Fy

func Fy(length svg.Length) svg.Attribute

Fy defines the y coordinate of the start circle of the radial gradient.

func GradientTransform

func GradientTransform(transforms ...transforms.Transform) svg.Attribute

GradientTransform contains the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system.

func GradientUnits

func GradientUnits(mode string) svg.Attribute

GradientUnits defines the coordinate system used for attributes specified on the gradient elements. Values: userSpaceOnUse | objectBoundingBox

func Height

func Height(lengthOrPercent svg.LengthOrPercent) svg.Attribute

func Href

func Href(url string) svg.Attribute

func ID

func ID(id string) svg.Attribute

ID specifies the element's ID

func In

func In(value string) svg.Attribute

In identifies the second input for the given filter primitive. It works exactly like the in attribute. Values: SourceGraphic | SourceAlpha | BackgroundImage | BackgroundAlpha | FillPaint | StrokePaint | <filter-primitive-reference>

func In2

func In2(value string) svg.Attribute

In2 identifies input for the given filter primitive. Values: SourceGraphic | SourceAlpha | BackgroundImage | BackgroundAlpha | FillPaint | StrokePaint | <filter-primitive-reference>

func K1

func K1(number svg.Number) svg.Attribute

K1 defines one of the values to be used within the the arithmetic operation of the <feComposite> filter primitive.

func K2

func K2(number svg.Number) svg.Attribute

K2 defines one of the values to be used within the the arithmetic operation of the <feComposite> filter primitive.

func K3

func K3(number svg.Number) svg.Attribute

K3 defines one of the values to be used within the the arithmetic operation of the <feComposite> filter primitive.

func K4

func K4(number svg.Number) svg.Attribute

K4 defines one of the values to be used within the the arithmetic operation of the <feComposite> filter primitive.

func KernelMatrix

func KernelMatrix(cellNumbers ...svg.Number) svg.Number

KernelMatrix defines the list of numbers that make up the kernel matrix for the <feConvolveMatrix> element.

func KeySplines

func KeySplines(curves ...string) svg.Attribute

KeySplines defines a set of Bézier curve control points associated with the keyTimes list, defining a cubic Bézier function that controls interval pacing.

func KeyTimes

func KeyTimes(times ...svg.Number) svg.Attribute

KeyTimes represents a list of time values used to control the pacing of the animation.

func LengthAdjust

func LengthAdjust(mode string) svg.Attribute

LengthAdjust controls how the text is stretched into the length defined by the textLength attribute. Values: spacing | spacingAndGlyphs

func LimitingConeAngle

func LimitingConeAngle(angle svg.Number) svg.Attribute

LimitingConeAngle represents the angle in degrees between the spot light axis (i.e. the axis between the light

source and the point to which it is pointing at) and the spot light cone.

func MarkerHeight

func MarkerHeight(length svg.Length) svg.Attribute

MarkerHeight represents the height of the viewport into which the <marker> is to be fitted when it is rendered

according to the viewBox and preserveAspectRatio attributes.

func MarkerUnits

func MarkerUnits(units string) svg.Attribute

MarkerUnits defines the coordinate system for the markerWidth and markerUnits attributes and the contents of the <marker>.

func MarkerWidth

func MarkerWidth(length svg.Length) svg.Attribute

MarkerWidth represents the width of the viewport into which the <marker> is to be fitted when it is rendered according to

the viewBox and preserveAspectRatio attributes.

Default: 3

func Mask

func Mask(mask string) svg.Attribute

Mask is a presentation attribute mainly used to bind a given <mask> element with the element the attribute belongs to.

func MaskContentUnits

func MaskContentUnits(units string) svg.Attribute

MaskUnit indicates which coordinate system to use for the contents of the <mask> element. Values: userSpaceOnUse | objectBoundingBox

func MaskUnit

func MaskUnit(units string) svg.Attribute

MaskUnit indicates which coordinate system to use for the geometry properties of the <mask> element. Values: userSpaceOnUse | objectBoundingBox

func Max

func Max(time svg.Number) svg.Attribute

Max specifies the maximum value of the active animation duration.

func Method

func Method(method string) svg.Attribute

Method indicates the method by which text should be rendered along the path of a <textPath> element. Values: align | stretch

func Min

func Min(time svg.Number) svg.Attribute

Min specifies the minimum value of the active animation duration.

func Mode

func Mode(value string) svg.Attribute

Mode defines the blending mode on the <feBlend> filter primitive. Values: normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light |

difference | exclusion | hue | saturation | color | luminosity

func NumOctaves

func NumOctaves(number svg.Number) svg.Attribute

NumOctaves defines the number of octaves for the noise function of the <feTurbulence> primitive.

func Offset

func Offset(numberOrPercent svg.NumberOrPercent) svg.Attribute

Offset defines where the gradient stop is placed along the gradient vector.

func Opacity

func Opacity(number svg.Number) svg.Attribute

Opacity specifies the transparency of an object or of a group of objects, that is, the degree to which the background behind the element is overlaid. Values: [0-1]

func Operator

func Operator(value string) svg.Attribute

Operator has two meanings based on the context itʼs used in. Either it defines the compositing or morphing operation to be performed. Values: over | in | out | atop | xor | lighter | arithmetic

func Order

func Order(cellNumbers ...svg.Number) svg.Number

Order indicates the size of the matrix to be used by a <feConvolveMatrix> element.

func Orient

func Orient(orient svg.Number) svg.Attribute

Orient indicates how a marker is rotated when it is placed at its position on the shape. Values: auto | auto-start-reverse | <angle> | <number>

func PathLength

func PathLength(number svg.Number) svg.Attribute

PathLength is the total length for the circle's circumference, in user units. Values: bounding-box | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | none

func PatternContentUnits

func PatternContentUnits(mode string) svg.Attribute

PatternContentUnits indicates which coordinate system to use for the contents of the <pattern> element. Values: userSpaceOnUse | objectBoundingBox

func PatternTransform

func PatternTransform(transforms ...transforms.Transform) svg.Attribute

PatternTransform defines a list of transform definitions that are applied to a pattern tile.

func PatternUnits

func PatternUnits(mode string) svg.Attribute

PatternUnits indicates which coordinate system to use for the geometry properties of the <pattern> element. Values: userSpaceOnUse | objectBoundingBox

func PointerEvents

func PointerEvents(event string) svg.Attribute

PointerEvents is a presentation attribute that allows defining whether or when an element may be the target of a mouse event.

func Points

func Points(points string) svg.Attribute

Points defines a list of points.

func PointsAtX

func PointsAtX(coordinate svg.Number) svg.Attribute

PointsAtX represents the x location in the coordinate system established by attribute primitiveUnits on the <filter> element of the point at which the light source is pointing.

func PointsAtY

func PointsAtY(coordinate svg.Number) svg.Attribute

PointsAtY represents the y location in the coordinate system established by attribute primitiveUnits on the <filter> element of the point at which the light source is pointing.

func PointsAtZ

func PointsAtZ(coordinate svg.Number) svg.Attribute

PointsAtZ represents the z location in the coordinate system established by attribute primitiveUnits on the <filter> element of the point at which the light source is pointing, assuming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.

func PreserveAlpha

func PreserveAlpha(preserve bool) svg.Attribute

PreserveAlpha indicates how a <feConvolveMatrix> element handled alpha transparency.

func PreserveAspectRatio

func PreserveAspectRatio(value string) svg.Attribute

PreserveAspectRatio indicates how an element with a viewBox providing a given aspect ratio must fit into a viewport with a different aspect ratio.

func PrimitiveUnits

func PrimitiveUnits(units string) svg.Attribute

PrimitiveUnits specifies the coordinate system for the various length values within the filter primitives and for the attributes that define the filter primitive subregion. Values: userSpaceOnUse | objectBoundingBox

func R

func R(length svg.Length) svg.Attribute

R is the radius of the circle. A value lower or equal to zero disables rendering of the circle.

func Radius

func Radius(radii ...svg.Number) svg.Attribute

func RefX

func RefX(length svg.Length) svg.Attribute

RefX defines the x coordinate of an element’s reference point. Values: <number> | left | center | right

func RefY

func RefY(length svg.Length) svg.Attribute

RefY defines the y coordinate of an element’s reference point. Values: <number> | top | center | bottom

func RepeatCount

func RepeatCount(count svg.Number) svg.Attribute

RepeatCount indicates the number of times an animation will take place. Values: a number or "indefinite"

func RepeatDur

func RepeatDur(duration svg.Number) svg.Attribute

RepeatCount indicates the number of times an animation will take place. Values: a time or "indefinite" Defaults to seconds

func Restart

func Restart(value string) svg.Attribute

Restart specifies whether or not an animation can restart. Values: always | whenNotActive | never

func Rotate

func Rotate(value svg.Number) svg.Attribute

Rotate specifies how the animated element rotates as it travels along a path specified in an <animateMotion> element. Values: auto | auto-reverse | <number>

func Scale

func Scale(scale svg.Number) svg.Attribute

Scale defines the displacement scale factor to be used on a <feDisplacementMap> filter primitive.

func Seed

func Seed(seed svg.Number) svg.Attribute

Seed represents the starting number for the pseudo random number generator of the <feTurbulence> filter primitive.

func ShapeRendering

func ShapeRendering(rendering string) svg.Attribute

ShapeRendering provides hints to the renderer about what tradeoffs to make when rendering shapes like paths, circles, or rectangles. Values: auto | optimizeSpeed | crispEdges | geometricPrecision

func Side

func Side(mode string) svg.Attribute

Side determines the side of a path the text is placed on (relative to the path direction). Values left | right

func Spacing

func Spacing(mode string) svg.Attribute

Spacing indicates how the user agent should determine the spacing between typographic characters that are to be rendered along a path. Values: auto | exact

func SpecularConstant

func SpecularConstant(constant svg.Number) svg.Attribute

SpecularConstant attribute controls the ratio of reflection of the specular lighting. It represents the ks value in the Phong lighting model.

func SpecularExponent

func SpecularExponent(exponent svg.Number) svg.Attribute

SpecularExponent controls the focus for the light source. The bigger the value the brighter the light.

func SpreadMethod

func SpreadMethod(mode string) svg.Attribute

SpreadMethod determines how a shape is filled beyond the defined edges of a gradient. Values: pad | reflect | repeat

func StartOffset

func StartOffset(offset svg.Number) svg.Attribute

StartOffset defines an offset from the start of the path for the initial current text position along the path after converting the path to the <textPath> element's coordinate system.

func StdDeviation

func StdDeviation(std svg.Number) svg.Attribute

StdDeviation defines the standard deviation for the blur operation.

func StitchTiles

func StitchTiles(tiles string) svg.Attribute

StitchTiles defines how the Perlin Noise tiles behave at the border. Values: noStitch | stitch

func StopColor

func StopColor(color string) svg.Attribute

StopColor defines the color of the gradient stop.

func StopOpacity

func StopOpacity(opacity svg.Number) svg.Attribute

StopOpacity defines the opacity of a given color gradient stop. Value: [0-1]

func Stroke

func Stroke(color string) svg.Attribute

Stroke is a presentation attribute defining the color (or any SVG paint servers like gradients or patterns) used to paint the outline of the shape.

func StrokeDasharray

func StrokeDasharray(lengthOrPercents ...svg.LengthOrPercent) svg.Attribute

StrokeDasharray is a presentation attribute defining the pattern of dashes and gaps used to paint the outline of the shape.

func StrokeDashoffset

func StrokeDashoffset(lengthOrPercent svg.LengthOrPercent) svg.Attribute

StrokeDashoffset is a presentation attribute defining an offset on the rendering of the associated dash array.

func StrokeLinecap

func StrokeLinecap(style string) svg.Attribute

StrokeLinecap is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked. Values: butt | round | square

func StrokeLinejoin

func StrokeLinejoin(style string) svg.Attribute

StrokeLinejoin is a presentation attribute defining the shape to be used at the corners of paths when they are stroked.

func StrokeMiterlimit

func StrokeMiterlimit(number svg.Number) svg.Attribute

StrokeMiterlimit is a presentation attribute defining a limit on the ratio of the miter length to the stroke-width used to draw a miter join.

func StrokeOpacity

func StrokeOpacity(numberOrPercent svg.NumberOrPercent) svg.Attribute

StrokeOpacity is a presentation attribute defining the opacity of the paint server (color, gradient, pattern, etc) applied to the stroke of a shape. Values: [0-1] | percentage

func StrokeWidth

func StrokeWidth(lengthOrPercent svg.LengthOrPercent) svg.Attribute

StrokeWidth is a presentation attribute defining the width of the stroke to be applied to the shape.

func Style

func Style(style string) svg.Attribute

func SurfaceScale

func SurfaceScale(height svg.Number) svg.Attribute

SurfaceScale represents the height of the surface for a light filter primitive.

func SystemLanguage

func SystemLanguage(lang string) svg.Attribute

SystemLanguage represents a list of supported language tags.

func TabIndex

func TabIndex(integer svg.Number) svg.Attribute

func TargetX

func TargetX(integer svg.Number) svg.Attribute

TargetX determines the positioning in horizontal direction of the convolution matrix relative to a given target pixel in the input image.

func TargetY

func TargetY(integer svg.Number) svg.Attribute

TargetY determines the positioning in vertical direction of the convolution matrix relative to a given target pixel in the input image.

func TextLength

func TextLength(value svg.Number) svg.Attribute

TextLength available on SVG <text> and <tspan> elements, lets you specify the width of the space into which the text will draw.

func To

func To(value string) svg.Attribute

TO indicates the final value of the attribute that will be modified during the animation.

func Transform

func Transform(transforms ...transforms.Transform) svg.Attribute

func Type

func Type(value string) svg.Attribute

Type is a generic attribute and it has different meaning based on the context in which it's used.

func Values

func Values(numbers ...svg.Number) svg.Attribute

Values has different meanings, depending upon the context where itʼs used, either it defines a sequence of values used over the course of an animation, or itʼs a list of numbers for a color matrix, which is interpreted differently depending on the type of color change to be performed.

func VectorEffect

func VectorEffect(effect string) svg.Attribute

VectorEffect pecifies the vector effect to use when drawing an object. Vector effects are applied before any of the other compositing operations, i.e. filters, masks and clips. Values: none | non-scaling-stroke | non-scaling-size | non-rotation | fixed-position

func ViewBox

func ViewBox(minX, minY, width, height svg.Number) svg.Attribute

func Visibility

func Visibility(state string) svg.Attribute

Visibility lets you control the visibility of graphical elements. With a value of hidden or collapse the current graphics element is invisible. Values: visible | hidden | collapses

func Width

func Width(lengthOrPercent svg.LengthOrPercent) svg.Attribute

func X

func X(lengthOrPercent svg.LengthOrPercent) svg.Attribute

func X1

func X1(lengthOrPercent svg.LengthOrPercent) svg.Attribute

X2 is used to specify the first x-coordinate for drawing an SVG element that requires more than one coordinate.

func X2

func X2(lengthOrPercent svg.LengthOrPercent) svg.Attribute

func XChannelSelector

func XChannelSelector(channel string) svg.Attribute

XChannelSelector indicates which color channel from in2 to use to displace the pixels in in along the x-axis. Values: R | G | B | A

func Y

func Y(lengthOrPercent svg.LengthOrPercent) svg.Attribute

func Y1

func Y1(lengthOrPercent svg.LengthOrPercent) svg.Attribute

Y1 is used to specify the first y-coordinate for drawing an SVG element that requires more than one coordinate.

func Y2

func Y2(lengthOrPercent svg.LengthOrPercent) svg.Attribute

Y2 is used to specify the first y-coordinate for drawing an SVG element that requires more than one coordinate.

func YChannelSelector

func YChannelSelector(channel string) svg.Attribute

YChannelSelector indicates which color channel from in2 to use to displace the pixels in in along the y-axis. Values: R | G | B | A

func Z

func Z(coordinate svg.Number) svg.Attribute

Z defines the location along the z-axis for a light source in the coordinate system established by the primitiveUnits attribute on the <filter> element, assuming that, in the initial coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL