fillSvgElement()

Modifies the SVG image used for filling a shape.

Synopsis

shape.fillSvgElement(string element, string fill, string color);

Parameters

Parameter Description
element The SVG element to be adjusted
fill The fill type to be used. (e.g.: solid)
color The color to be used. This is only relevant for fill-types that use a color (Solid and hatch). For other types it can be given as empty string.

Description

The fillable primitive shape object needs to have an SVG already loaded (either set as fill attribute or defined in the Panel in GEDI). The element inside this SVG is then adjusted to use the given fill-string (e.g. "[solid]") and the given color for this fill type. The color is only relevant for fill-types which use the color (solid and hatch). For others it can be given as an empty string.

Anmerkung: Inside the Script Editor the SVG element can be selected with the SVG-Element Selector from the tools menu. The elements shown here are only elements the script editor can already address (i.e. the ID for the specific shape elements is available) and that already have a defined SVG fill pattern set statically via the Attribute Editor. Text elements cannot be addressed. If no element is available, any SVG file can be inspected via the file selector.
Anmerkung: To revert the element in the SVG to its original fill style, pass the fill-string and the color-string as empty strings (e.g.: RECT.fillSvgElement("elem", "", ""); )

The given fill-string and color adhere to the current colorScheme and the active IconTheme and will also switch when these change in runtime. Blinking colors are supported as well.

Assignment

Button, Polygon, Arc, Ellipse, Rectangle