4D v14

SVG_SAVE_AS_PICTURE

Home

 
4D v14
SVG_SAVE_AS_PICTURE

SVG_SAVE_AS_PICTURE 


 

SVG_SAVE_AS_PICTURE ( svgObject ; document {; codec} ) 
Parameter Type   Description
svgObject  SVG_Ref in SVG object reference
document  String in Document name or Full pathname of document
codec  String in Picture codec ID

The SVG_SAVE_AS_PICTURE command writes the contents of the SVG object specified by svgObject into the picture file specified by document. If svgObject is not an SVG document, an error is generated.

In document, you can pass the full pathname of the file, or only the file name – in which case the file will be created next to the database structure file. If you pass an empty string ("") in document, the standard Save file dialog box appears so that the user can specify the name, location and format of the file to be created.

The optional codec parameter can be used to specify the format in which to save the picture. If this parameter is omitted, the picture is saved in png format.

The SVG_SAVE_AS_PICTURE modifies the value of the variable (if any) designated by the SVG_SET_DOCUMENT_VARIABLE command.

Example  

 svgRef:=SVG_New(500;200;Sales statistics)
 ...
 SVG_SAVE_AS_PICTURE(svgRef;test.png) `Save
 SVG_SAVE_AS_PICTURE(svgRef;test.gif;".gif")
 SVG_CLEAR(svgRef)

 
PROPERTIES 

Product: 4D
Theme: Documents
Number: 65994

 
HISTORY 

Created: Composant 4D SVG v11.3
Modified: 4D v13

 
SEE ALSO 

SVG_Export_to_picture
SVG_SET_DOCUMENT_VARIABLE

 
ARTICLE USAGE

4D SVG Component ( 4D v13)
4D SVG Component ( 4D v14)

Inherited from : SVG_SAVE_AS_PICTURE ( 4D v12)