4D v15

SVG_New

  •  
 
4D v15
SVG_New

SVG_New 


 

SVG_New {( ancho ; alto {; titulo {; descripcion {; rectangulo {; visualizacion}}}} )} -> Resultado 
Parámetro Tipo   Descripción
ancho  Entero largo in Ancho del documento en puntos
alto  Entero largo in Alto del documento en puntos
titulo  Cadena in Texto del documento
descripcion  Cadena in Descripción
rectangulo  Booleano in Definir el rectángulo de visualización
visualizacion  Entero in Formato de visualización de la imagen
Resultado  Ref_SVG in Referencia del objeto SVG

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.

Example  

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



Ver también 

SVG_CLEAR
SVG_Copy
SVG_Open_file