svggetstyle
svggetstyle |
Purpose
Synopsis
function svggetstyle(gid: string, prop: string):text
function svggetstyle(prop: string):text
function svggetstyle(obj: integer, prop: string):text
Arguments
gid
|
Object group ID.
|
obj
|
Object ID.
|
prop
|
The desired property (
mmsvg constant or SVG property name).
|
Return value
Value of the property or empty string.
Example
This code retrieves the color of a group and applies it to an object belonging to another group.
svgaddgroup("a", "Group A") svgaddgroup("b", "Group B") svgaddtext("a", 20, 120, "Formatted text") svgsetstyle(svggetlastobj, SVG_COLOR, svggetstyle("b", SVG_COLOR))
Further information
This function can be used to retrieve a style property of some object in order to apply it to some other object or group of objects. Use
svggetstylesheet to retrieve the whole set of style properties of an object or group of objects.
Related topics