4D v16

SVG_SET_OPTIONS

Home

 
4D v16
SVG_SET_OPTIONS

SVG_SET_OPTIONS 


 

SVG_SET_OPTIONS {( options )} 
Parameter Type   Description
options  Longint in 4D SVG component options

The SVG_SET_OPTIONS command can be used to set the options of the 4D SVG component with the options longint. For more information about the contents of options, please refer to the description of the SVG_Get_options command.

Since all options will be set at once, this command must have been preceded with a call to the SVG_Get_options command, followed by the use of the Bitwise Operators of 4D.

If the options parameter is not passed, all the options are reset to their default value (see the SVG_Get_options command).

Create readable code:

 $Options :=SVG_Get_options
 $Options :=$Options ?+5 `enable the option
 SVG_SET_OPTIONS($Options)

Draw a pie chart diagram:

 $svg:=SVG_New
 
  `Enable automatic closing of objects
 SVG_SET_OPTIONS(SVG_Get_options?+2)
 
 SVG_New_arc($svg;100;100;90;0;105;"gray";"lightcoral";1)
 SVG_New_arc($svg;100;100;90;105;138;"gray";"lightskyblue";1)
 SVG_New_arc($svg;100;100;90;138;230;"gray";"lightgreen";1)
 SVG_New_arc($svg;100;100;90;230;270;"gray";"lightsteelblue";1)
 SVG_New_arc($svg;100;100;90;270;360;"gray";"lightyellow";1)

Displaying multiple spaces in text objects using the Keep extra spaces option (13) (added in v14):

 

 $Txt_buffer:="abc      def"
 $Dom_text:=SVG_New_textArea($Dom_svg;$Txt_buffer;50;50)

is displayed as "abc def"

 

 SVG_SET_OPTIONS(SVG_Get_options?+13) // keep spaces in text objects
 $Txt_buffer:="abc      def"
 $Dom_text:=SVG_New_textArea($Dom_svg;$Txt_buffer;50;50)

is displayed as "abc      def"



See also 

SVG_Get_options

 
PROPERTIES 

Product: 4D
Theme: Utilities
Number: 65913

 
HISTORY 

Created: Composant 4D SVG v11.3
Modified: 4D v14

 
ARTICLE USAGE

4D SVG Component ( 4D v16)