Dies ist die alte 4D Dokumentations-Website. Die neue und aktualisierte Dokumentation finden Sie unter developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
SVG_Filter_Offset
|
SVG_Filter_Offset ( filterRef ; dx {; dy {; input {; Auswahlname}}} ) -> Funktionsergebnis | ||||||||
Parameter | Typ | Beschreibung | ||||||
filterRef | SVG_Ref |
![]() |
Reference of filter | |||||
dx | Lange Ganzzahl |
![]() |
Offset on X axis | |||||
dy | Lange Ganzzahl |
![]() |
Offset on Y axis | |||||
input | String |
![]() |
Source of filter primitive | |||||
Auswahlname | String |
![]() |
Target of filter primitive | |||||
Funktionsergebnis | SVG_Ref |
![]() |
Reference of primitive | |||||
The SVG_Filter_Offset command sets an offset for the filterRef filter and returns its reference. If filterRef is not a filter reference, an error is generated.
The dx parameter is the value of the horizontal offset.
The optional dy parameter is the value of the vertical offset.
The optional input parameter identifies the graphic source of the filter primitive. You can pass:
The optional name is the name, if any, assigned to the result of this filter primitive.
Note: Starting with 4D v14 R5, this command works under Windows with Direct2D enabled in software mode (see the Direct2D software constant in the description of the SET DATABASE PARAMETER command).
In a form, we display two identical SVG pictures then we create an "offset" filter and assign to the one on the right:
$root:=SVG_New(400;400;"filters test") //definition of first (left) picture
$rect:=SVG_New_rect($root;10;10;380;100;0;0;"darkblue";"white";1)
SVG_SET_FILL_BRUSH($root;"orange")
$textAreaRef:=SVG_New_textArea($root;"Hello World!";10;10;380;100;"arial";60;Normal;Align center)
<>pict1:=SVG_Export_to_picture($root) //display first picture
$root2:=SVG_New(400;400;"filters test") //definition of identical (right) picture
$rect2:=SVG_New_rect($root2;10;10;380;100;0;0;"darkblue";"white";1)
SVG_SET_FILL_BRUSH($root2;"orange")
$textAreaRef2:=SVG_New_textArea($root2;"Hello World!";10;10;380;100;"arial";60;Normal;Align center)
$filter:=SVG_Define_filter($root2;"Offset") //create filter
SVG_Filter_Offset($filter;10;20)
SVG_SET_FILTER($textAreaRef2;"Offset") //apply filter
<>pict2:=SVG_Export_to_picture($root2) //display second picture
Result:
Produkt: 4D
Thema: Filters
Nummer:
65917
Erstellt: Composant 4D SVG v11.3
Geändert: 4D v14 R5
4D SVG ( 4D v20 R7)