Dies ist die alte 4D Dokumentations-Website. Die neue und aktualisierte Dokumentation finden Sie unter developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
SVG_New_embedded_image
|
SVG_New_embedded_image ( parentSVGObject ; Bild {; x {; y}}{; codec} ) -> Funktionsergebnis | ||||||||
Parameter | Typ | Beschreibung | ||||||
parentSVGObject | SVG_Ref |
![]() |
Reference of parent element | |||||
Bild | Bild |
![]() |
Picture to be embedded | |||||
x | Lange Ganzzahl |
![]() |
Coordinate on X axis of upper left corner | |||||
y | Lange Ganzzahl |
![]() |
Coordinate on Y axis of upper left corner | |||||
codec | Text |
![]() |
Codec to use | |||||
Funktionsergebnis | SVG_Ref |
![]() |
SVG object reference | |||||
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).
The optional codec parameter sets the codec to use for the picture. By default, if this parameter is omitted, the codec is ".png".
Embed the ‘logo4D.png’ picture located in the ‘Resources’ folder:
svgRef:=SVG_New
$Path:=Get 4D folder(Current resources folder)+"logo4D.png")
READ PICTURE FILE($Path;$Picture)
If(OK=1)
objectRef:=SVG_New_embedded_image(svgRef;$Picture)
End if
Produkt: 4D
Thema: Drawing
Nummer:
65968
Erstellt: Composant 4D SVG v11.3
Geändert: 4D v13
4D SVG ( 4D v20 R7)