version 11.3
SVG_Get_options Longint
| Parameter | Type | Description | ||||
| This command does not require any parameters | ||||||
| Function result | Longint | Options | ||||
Description
The SVG_Get_options command returns a longint representing a 32-bit array where each bit can represent an option of the component. You can use the operators on the 4D bits to check the state of an option (??), and to enable (?+) or disable (?-) one of them.
The following options are currently available:
| Bit | Option | Default | |
| 1 | Assign an ID automatically when creating an element | 0 (disabled) | |
| 2 | Automatically close any objects thatcan be | 0 (disabled) | |
| 3 | Create objects with a background | 1 (enabled) | |
| 4 | Absolute coordinates for paths | 1 (enabled) | |
| 5 | Create more readable code | 0 (disabled) | |
| 6 | Beep when an error occurs | 1 (enabled) | |
| 7 | Do not display4D errors | 0 (disabled) | |
| 8 | Transparent pictures | 1 (enabled) |
Assign an ID automatically when creating an element
If this option is enabled, when the component creates a new element, it systematically adds and fills in an 'id' attribute for the object created, if this is not already specified.
Automatically close objects
If this option is enabled, the objects created with the SVG_New_arc and SVG_New_polyline_by_arrays commands will be automatically closed.
Create objects with a background
If this option is enabled, closed objects will be created with a background color; otherwise, the background will be transparent.
Absolute coordinates for paths
When drawing paths with the SVG_PATH_MOVE_TO, SVG_PATH_LINE_TO, SVG_PATH_CURVE and SVG_PATH_ARC commands, the coordinates passed will be interpreted as absolute if this option is enabled; otherwise they will be considered as relative.
Create more readable code
This option can be used to create indented and well-spaced code which is nevertheless unwieldy; its activation is particularly useful during the debugging phase.
Beep when an error occurs
When an error occurs and no host database error-handling method has been installed with the SVG_Set_error_handler command, a beep is emitted if this option is enabled.
Do not display 4D errors
This option which is enabled by default blocks the display of 4D errors by installing an error-handling method peculiar to the component. You may prefer not to use this internal management and to let 4D display these messages. This can be useful during debugging for example.
Transparent pictures
By default, SVG pictures created with the SVG_New command are transparent. By disabling this option, the pictures will be on a white background.
Example
See the SVG_SET_OPTIONS command.
See Also