SVG_New_embedded_image

4D - Documentation   Français   English   German   4D SVG Component, Command Theme List   4D SVG Component, Index   Back   Previous   Next

version 11.3


SVG_New_embedded_image (parentSVGObject; picture{; x{; y}}) SVG_Ref

ParameterTypeDescription
parentSVGObjectSVG_RefReference of parent element
picturePicturePicture to be embedded
xNumberCoordinate on X axis of upper left corner
yNumberCoordinate on Y axis of upper left corner
Function resultSVG_RefSVG object reference

Description

The SVG_New_embedded_image command can be used to embed the picture picture in the SVG container designated by parentSVGObject and to return its reference. If parentSVGObject is not an SVG document, an error is generated.

The picture will be encoded in base64 then embedded in the document.

The picture parameter is a 4D picture field or variable.

The optional x and y parameters can be used to specify the position of the upper left corner of the picture in the SVG containers (default value 0).

Example

Embed the 'logo4D.png' picture located in the 'Resources' folder:

   svgRef:= SVG_New 
   $Path :=Resources folder+"logo4D.png")
   READ PICTURE FILE($Path; $Picture)
   If (OK=1)
      objectRef:=SVG_New_embedded_image (svgRef; $Picture)
   End if

See Also

SVG_New_image, SVG_Open_picture.


4D - Documentation   Français   English   German   4D SVG Component, Command Theme List   4D SVG Component, Index   Back   Previous   Next