4D v16

SVG_New

Home

 
4D v16
SVG_New

SVG_New 


 

SVG_New {( width ; height {; Titel {; Beschreibung {; rectangle {; Anzeige}}}} )} -> Funktionsergebnis 
Parameter Typ   Beschreibung
width  Lange Ganzzahl in Document width
height  Lange Ganzzahl in Document height
Titel  String in Document title
Beschreibung  String in Description
rectangle  Boolean in Set viewbox
Anzeige  Ganzzahl in Picture display format
Funktionsergebnis  SVG_Ref in SVG object reference

The SVG_New command creates a new SVG document and returns its reference number.

The optional width and height parameters can be used to limit the space of the SVG document to the dimensions indicated. These 2 parameters are expected in user points ('px'); if you want to specify another unit, you must use the SVG_SET_DIMENSIONS command.

The optional title and description parameters can be used to give information about the contents.

If you pass True in the optional rectangle parameter, the viewbox ('viewBox' attribute) is automatically set to the size of the document created.

Note: It is possible to modify the coordinates of the graphic viewbox and to adjust the fitting of the picture to it more precisely using the SVG_SET_VIEWBOX command.

The optional display parameter can be used to indicate whether the graphic must be fitted to the size of the document. You can pass one of the following 4D picture display format constants as parameter: Scaled to fit prop centered or Scaled to Fit.

The command returns a 16-character string (SVG_Ref) that consists of the reference in memory of the document virtual structure. This reference must be used with the other commands of the component.

Important: Once you no longer need it, do not forget to call the SVG_CLEAR command with this reference in order to free up the memory.

 svgRef:=SVG_New
 svgRef:=SVG_New(500;200)
 svgRef:=SVG_New(900;700;"SVG component test";"This is an example";True;Scaled to fit)



Siehe auch 

SVG_CLEAR
SVG_Copy
SVG_Open_file

 
EIGENSCHAFTEN 

Produkt: 4D
Thema: Documents
Nummer: 65999

 
GESCHICHTE 

Erstellt: Composant 4D SVG v11.3

 
ARTIKELVERWENDUNG

4D SVG ( 4D v16)