Stroke functions
All return vg_lite_error_t
status.
vg_lite_set_path_type
function
Description:
This function sets the path type*. (from March 2022)*
Syntax:
vg_lite_error_t vg_lite_set_path_type (
vg_lite_path_t *path,
vg_lite_path_type_t path_type
);
Parameters:
Parameter |
Description |
---|---|
|
Pointer to the vg_lite_path_t structure that describes the vector path. |
|
Pointer to a |
Returns:
Returns VG_LITE_SUCCESS
if successful. See vg_lite_error_t enum for other return codes.
Parent topic:Stroke functions
vg_lite_set_stroke
function
Description:
This function uses input parameters to set stroke attributes (from March 2022).
Syntax:
vg_lite_error_t vg_lite_set_stroke (
vg_lite_path_t *path,
vg_lite_cap_style_t cap_style,
vg_lite_join_style_t join_style,
vg_lite_float_t line_width,
vg_lite_float_t miter_limit,
vg_lite_float_t *dash_pattern,
vg_lite_uint32_t pattern_count,
vg_lite_float_t dash_phase,
vg_lite_color_t color
);
Parameters:
Parameter |
Description |
---|---|
|
Pointer to the |
|
The end cap style is defined by the |
|
The line join style defined by the |
|
The line width of the stroke path. A line width less than or equal to 0 prevents stroking from taking place. |
|
When stroking using the Miter stroke |
|
Pointer to a dash pattern that consists of a sequence of lengths of alternating “on” and “off” dash segments. The first value of the dash array defines the length, in user coordinates, of the first “on” dash segment. The second value defines the length of the following “off” segment. Each subsequent pair of values defines one “on” and one “off” segment. Note: If the dash pattern has an odd number of elements, the final element is ignored. |
|
The count of dash on/off segments. |
|
Defines the starting point in the dash pattern that is associated with the start of the first segment of the path. For example, if the dash pattern is [10 20 30 40] and the dash phase is 35, the path is stroked with an “on” segment of length 25 (skipping the first “on” segment of length 10, the following “off” segment of length 20, and the first 5 units of the next “on” segment), followed by an “off” segment of length 40. The pattern is then repeated from the beginning, with an “on” segment of length 10, an “off” segment of length 20, an “on” segment of length 30. |
|
The stroke color. |
Returns:
Returns VG_LITE_SUCCESS
if successful. See vg_lite_error_t enum for other return codes.
Parent topic:Stroke functions
vg_lite_update_stroke
function
Description:
This function uses the path and stroke attributes as specified with the function vg_lite_set_stroke
to update the stroke path’s parameters and generate stroke path data . (from March 2022)
Syntax:
vg_lite_error_t vg_lite_update_stroke (
vg_lite_path_t *path,
);
Parameters:
Parameter |
Description |
---|---|
|
Pointer to the vg_lite_path_t structure that describes the path. |
Returns:
Returns VG_LITE_SUCCESS
if successful. See vg_lite_error_t enum for other return codes.
Parent topic:Stroke functions
Parent topic:Stroke operations