This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
SVG_SET_FILL_RULE
|
SVG_SET_FILL_RULE ( svgObject ; fillRule ) | ||||||||
Parameter | Type | Description | ||||||
svgObject | SVG_Ref |
![]() |
Reference of SVG element | |||||
fillRule | Text |
![]() |
Mode for filling object | |||||
The SVG_SET_FILL_RULE command is used to specify the fill rule for the SVG object designated by svgObject. An error is generated if svgObject is not a valid reference.
The fillRule parameter must contain one of the following values: "nonzero", "evenodd" or "inherit". Otherwise, an error is generated.
See Also: http://www.w3.org/TR/SVG/painting.html#FillRuleProperty
Illustration of filling modes:
//Creating a path with the 'evenodd' fill rule
$Dom_path:=SVG_New_path($Dom_SVG;250;75)
SVG_PATH_LINE_TO($Dom_path;323;301;131;161;369;161;177;301)
SVG_PATH_CLOSE($Dom_path)
SVG_SET_FILL_BRUSH($Dom_path;"red")
SVG_SET_STROKE_WIDTH($Dom_path;3)
SVG_SET_FILL_RULE($Dom_path;"evenodd")
//Creating a similar object with the 'nonzero' fill rule
$Dom_path:=SVG_New_path($Dom_SVG;250;75)
SVG_PATH_LINE_TO($Dom_path;323;301;131;161;369;161;177;301)
SVG_PATH_CLOSE($Dom_path)
SVG_SET_FILL_BRUSH($Dom_path;"red")
SVG_SET_STROKE_WIDTH($Dom_path;3)
SVG_SET_FILL_RULE($Dom_path;"nonzero")
//Horizontal movement
SVG_SET_TRANSFORM_TRANSLATE($Dom_path;300)
Product: 4D
Theme: Attributes
Number:
65899
Created: 4D v12
4D SVG Component ( 4D v19)