4D v14

SVG_Define_shadow

Home

 
4D v14
SVG_Define_shadow

SVG_Define_shadow 


 

SVG_Define_shadow ( parentSVGObject ; id {; deviation {; offsetX {; offsetY}}} ) -> Function result 
Parameter Type   Description
parentSVGObject  SVG_Ref in Reference of parent element
id  String in Name of filter
deviation  Longint in Value of shadow dispersion
offsetX  Longint in Offset on X axis
offsetY  Longint in Offset on Y axis
Function result  SVG_Ref in Reference of filter

The SVG_Define_shadow command sets a new shadow filter in the SVG container designated by parentSVGObject and returns its reference. If parentSVGObject is not an SVG document, an error is generated.

This filter will be applied to objects for which a shadow is desired using the SVG_SET_FILTER command.

The id parameter specifies the name of the filter. This name will be used to associate a filter with an object. If an element with the same name exists, it will be replaced.

The optional deviation parameter sets the intensity of the shadow dispersion. Default value: 4.

The optional offsetX and offsetY parameters specify, respectively, the horizontal and vertical offset of the shadow with respect to the object. Default value: 4.

Example  

Declaration of a filter that can be used to make a shadow beneath an object:

 $svg:=SVG_New
 
 $text:=SVG_New_text($svg;"SVG";52;76-45;"Verdana";45)
 SVG_SET_FONT_COLOR($text;"red")
  `Set filter
 SVG_Define_shadow($svg;"myShadow")
  `and apply it to text
 SVG_SET_FILTER($text;"myShadow")

 
PROPERTIES 

Product: 4D
Theme: Structure and Definitions
Number: 65987

 
HISTORY 

Created: Composant 4D SVG v11.3

 
SEE ALSO 

SVG_SET_FILTER

 
ARTICLE USAGE

4D SVG Component ( 4D v13)
4D SVG Component ( 4D v12)
4D SVG Component ( Composant 4D SVG v11.4)
4D SVG Component ( 4D v14 R2)
4D SVG Component ( 4D v14)
4D SVG Component ( 4D v14 R3)
4D SVG Component ( 4D v14 R4)