4D v15

SVG_New

  •  
 
4D v15
SVG_New

SVG_New 


 

SVG_New {( largo ; alto {; titulo {; descriçao {; retangulo {; visualizaçao}}}} )} -> Resultado 
Parâmetro Tipo   Descrição
largo  Inteiro longo in Largura do documento em pontos
alto  Inteiro longo in Altura do documento em pontos
titulo  String in Texto do documento
descriçao  String in Descrição
retangulo  Booleano in Definir o retângulo de visualização
visualizaçao  Inteiro in Formato de visualização da imagem
Resultado  Ref_SVG in Referencia do traço

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 também 

SVG_CLEAR
SVG_Copy
SVG_Open_file