| 4D v18SVG_New_tspan | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 SVG_New_tspan 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SVG_New_tspan ( parentSVGObject ; Text {; x {; y {; font | styleDef {; Größe {; Stil {; Ausrichtung {; color}}}}}}} ) -> Funktionsergebnis | ||||||||
| Parameter | Typ | Beschreibung | ||||||
| parentSVGObject | SVG_Ref |   | Reference of parent element | |||||
| Text | Text |   | Text to insert | |||||
| x | Lange Ganzzahl |   | Coordinate on X axis | |||||
| y | Lange Ganzzahl |   | Coordinate on Y axis | |||||
| font | styleDef | Text |   | Font name or Style definition | |||||
| Größe | Ganzzahl |   | Size of characters in points | |||||
| Stil | Ganzzahl |   | Style of characters | |||||
| Ausrichtung | Ganzzahl |   | Alignment | |||||
| color | String |   | Text color | |||||
| Funktionsergebnis | SVG_Ref |   | Reference of SVG text object | |||||
The SVG_New_tspan command creates a new element in the 'text', ‘tspan’ or 'textArea' element designated by parentSVGObject and returns its reference. If parentSVGObject is not a reference to a 'text', ‘tspan’ or 'textArea' element, an error is generated.
The different optional parameters are described with the SVG_New_text command. If certain optional parameters are omitted, their values are inherited from parent element(s).
In a text, it is possible to create paragraphs that inherit the properties of a parent.
 $SVG:=SVG_New
  `Creates a new text that is in Arial, blue, and aligned to the left
 $textID:=SVG_New_text($SVG;"";0;0;"arial";-1;-1;Align left;"blue")
  `Nested paragraphs with indentation and changing of size and style
 $textID:=SVG_New_tspan($textID;"TITLE 1";10;10;"";24;Bold+Underline)
 $textID:=SVG_New_tspan($textID;"Title 2";20;42;"";12;Bold)
 $textID:=SVG_New_tspan($textID;"Title 3";30;60;"";10;Bold+Italic)
 $textID:=SVG_New_tspan($textID;"Title 4";40;78;"";8;Italic)Changing a property while remaining in the same "text" element, here the size of the text.
 $textID:=SVG_New_text($SVG;"Writing ";10;10;"arial";12)
 SVG_SET_FONT_SIZE(SVG_New_tspan($textID;"with ");14)
 SVG_SET_FONT_SIZE(SVG_New_tspan($textID;"SVG ");18)
 SVG_SET_FONT_SIZE(SVG_New_tspan($textID;"is ");24)
 SVG_SET_FONT_SIZE(SVG_New_tspan($textID;"easy ");36)
	Produkt: 4D
	Thema: Text
	Nummer: 
        65956
        
        
        
	
	Erstellt: Composant 4D SVG v11.3
	Geändert: 4D v13
	
	
	
	
	4D SVG ( 4D v18)
	
	
 Fehler melden
Fehler melden