4D v16

SVG_Get_class

Home

 
4D v16
SVG_Get_class

SVG_Get_class 


 

SVG_Get_class ( svgObject {; classNames} ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
svgObject  SVG_Ref in SVG object reference
classNames  Zeiger in Pointer to array of class names
Funktionsergebnis  Text in Class name(s)

The SVG_Get_class command returns the class name(s) for an SVG image whose reference is passed in the svgObject parameter. Class name(s) are returned as a string, with each name separated by a space.

In the optional classNames parameter, you can pass a pointer to an array, whose elements will be filled with the class name(s).

  // define 2 styles
 SVG_Define_style($Dom_SVG;".colored {fill: yellow; fill-opacity: 0.6; stroke: red; stroke-width: 8; stroke-opacity: 0.6}")
 SVG_Define_style($Dom_SVG;".blue {fill: blue}")
 
  // create a group and set a default style
 $Dom_g:=SVG_New_group($Dom_SVG)
 SVG_SET_CLASS($Dom_g;"colored blue")
 
 ARRAY TEXT($tTxt_Classes;0)
 $Txt_buffer:=SVG_Get_class($Dom_g;->$tTxt_classes)
 
  // $Txt_buffer = "colored blue"
  // $tTxt_classes{1} = "colored"
  // $tTxt_classes{2} = "blue"

 
EIGENSCHAFTEN 

Produkt: 4D
Thema: Attributes

 
GESCHICHTE 

Erstellt: 4D v14

 
ARTIKELVERWENDUNG

4D SVG ( 4D v16)