Draw and gradient enumerations
This section provides an overview of draw and gradient enumerations.
vg_lite_blend_t
enumeration
This enumeration is defined under the “Blit enumerations” section (see vg_lite_blend_t enumeration).
Parent topic:Draw and gradient enumerations
vg_lite_color_t
parameter
The common parameter vg_lite_color_t
is described in Common parameter types.
Parent topic:Draw and gradient enumerations
vg_lite_fill_t
enumeration
This enumeration is used to specify the fill rule to use. For drawing any path, the hardware supports both non-zero and odd-even fill rules.
To determine whether any point is contained inside an object, imagine drawing a line from that point out to infinity in any direction such that the line does not cross any vertex of the path. For each edge that is crossed by the line, add 1 to the counter if the edge is crossed from left to right, as seen by an observer walking across the line towards infinity, and subtract 1 if the edge crossed from right to left. In this way, each region of the plane will receive an integer value.
The non-zero fill rule says that a point is inside the shape if the resulting sum is not equal to zero. The even/odd rule says that a point is inside the shape if the resulting sum is odd, regardless of sign.
Used in function: vg_lite_render_masklayer.
Used in draw functions: vg_lite_draw, vg_lite_draw_grad, vg_lite_draw_radial_grad, vg_lite_draw_pattern.
vg_lite_fill_t string values |
Description |
---|---|
VG_LITE_FILL_NON_ZERO |
Non-zero fill rule. A pixel is drawn if it crosses at least one path pixel. |
VG_LITE_FILL_EVEN_ODD |
Even-odd fill rule. A pixel is drawn if it crosses an odd number of path pixels. |
Parent topic:Draw and gradient enumerations
vg_lite_filter_t
enumeration
This enum is defined under the “Blit enumerations” section (see vg_lite_filter_t enumeration).
Parent topic:Draw and gradient enumerations
vg_lite_gradient_spreadmode_t
enumeration
vg_lite_gradient_spreadmode_t
enum is defined to match OpenVG enum VGColorRampSpreadMode (from March 2023, replacesvg_lite_radial_gradient_spreadmode*, requires GC355/GC555 hardware)*
The application may only define stops with offsets between 0 and 1. Spread modes define how the given set of stops are repeated or extended in order to define interpolated color values for arbitrary input values outside the [0,1] range.
Used in structure: vg_lite_radial_gradient_t.
vg_lite_gradient_spreadmode_t String Values |
Description |
---|---|
|
The current fill color is used for all stop values less than 0 or greater than 1 respectively. |
|
Colors defined at 0 and 1 are used for all stop values less than 0 or greater than 1 respectively. |
|
Color values defined between 0 and 1 are repeated indefinitely in both directions. |
|
Color values defined between 0 and 1 are repeated indefinitely in both directions but with alternate copies of the range reversed. |
Parent topic:Draw and gradient enumerations
vg_lite_pattern_mode_t
enumeration
Defines how the region outside the image pattern is filled for the path.
Used in function: vg_lite_draw_gradient
, vg_lite_draw_pattern
.
vg_lite_pattern_mode_t string values |
Description |
---|---|
|
Pixels outside the bounds of the source image should be taken as the color. |
|
Pixels outside the bounds of the source image should be taken as having the same color as the closest edge pixel. The color of the pattern border is expanded to fill the region outside the pattern. |
|
Pixels outside the bounds of the source image should be repeated indefinitely in all directions. (from March 2023) |
|
Pixels outside the bounds of the source image should be reflected indefinitely in all directions. (from March 2023) |
Parent topic:Draw and gradient enumerations
vg_lite_radial_gradient_spreadmode_t
enumeration
(Deprecated March 2023) use vg_lite_gradient_spreadmode_t.
Defines the radial gradient padding mode. (from Nov 2020, requires GC355 hardware)
Used in structure: vg_lite_radial_gradient_t.
vg_lite_radial_gradient_spreadmode_t String Values |
Description |
---|---|
|
The current fill color is used for all stop values less than 0 or greater than 1 respectively. |
|
Colors defined at 0 and 1 are used for all stop values less than 0 or greater than 1 respectively. |
|
Color values defined between 0 and 1 are repeated indefinitely in both directions. |
|
Color values defined between 0 and 1 are repeated indefinitely in both directions but with alternate copies of the range reversed. |
Parent topic:Draw and gradient enumerations
Parent topic:Vector-dased draw operations