4D v13SVG_Define_linear_gradient |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13
SVG_Define_linear_gradient
SVG_Define_linear_gradient
The SVG_Define_linear_gradient command sets a new linear gradient in the SVG container designated by parentSVGObject and returns its reference. If parentSVGObject is not an SVG document, an error is generated. A gradient consists in a continuous progressive color transition from one color to another along a vector. Once specified, gradients are called on a given graphic element, while indicating whether this element must be filled or edged with the gradient called. The id parameter specifies the name of the gradient. If an element with the same name exists, it will be replaced. This is the name that will be used to call the gradient each time a that a color expression is expected by using the syntax "url(#ID)". The startColor and endColor parameters specify the colors used to begin and end the gradient. The optional rotation parameter sets the position and direction of the gradient vector (see example). The optional spreadMethod parameter defines the filling to be used when the gradient begins or ends within the bounds of the parentSVGObject. You can pass one of the following strings in this parameter:
If this parameter is omitted, the "pad" value effect is used. The optional x1, y1, x2 and y2 parameters define the gradient vector. This vector provides the starting and ending points used by the rendering engine. You can pass percentages expressed as ratios (0...1) in these parameters. Draw 6 solid squares where each uses a linear gradient paint server while varying the rotation and direction of the gradient vector: $svg:=SVG_New |
PROPERTIES
Product: 4D
INDEX HISTORY
SEE ALSO
SVG Colors |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||