vg_lite_path_t
structure
This structure describes VGLite path data.
Path data is made of op codes and coordinates. The format for op codes is always VG_LITE_S8. For more details on opcodes, see Vector path opcodes for plotting paths.
Used in init functions: vg_lite_init_path, vg_lite_init_arc_path, vg_lite_upload_path, vg_lite_clear_path, vg_lite_append_path.
Used in draw functions: vg_lite_draw, vg_lite_draw_grad, vg_lite_draw_radial_grad, vg_lite_draw_pattern.
vg_lite_path_t members |
Type |
Description |
---|---|---|
|
|
bounding box for path [0] left [1] top [2] right [3] bottom |
|
enum for quality hint for the path, anti-aliasing level |
|
|
enum for coordinate format |
|
|
struct with path data that has been uploaded into GPU addressable memory |
|
|
|
number of bytes in the path |
|
|
pointer to path data |
|
|
0: not changed; 1: changed. |
|
|
0: path data memory is allocated by application; 1: path data memory is allocated by driver. |
|
The draw path type as specified in enum vg_lite_path_type_t. (added for stroke control, from March 2022) |
|
|
|
As defined by structure vg_lite_stroke_t (added for stroke control, from March 2022) |
|
|
Pointer to the physical description of the stroke path. (added for stroke control, from March 2022) |
|
|
Number of bytes in the stroke path data. (added for stroke control, from March 2022) |
|
The stroke path fill color. (from Sept 2022) |
|
|
|
Flag that add end_path in driver (from March 2023) |
Special notes for path objects:
Endianness has no impact, as it is aligned against the boundaries
Multiple contiguous opcodes should be packed by the size of the specified data format. For example, by 2 bytes for VG_LITE_S16 or by 4 bytes for VG_LITE_S32.
For example, because opcodes are 8-bit (1-byte), 16-bit (2-byte), or 32-bit (4-byte) data types:
…
<opcode1_that_needs_data>
<align_to_data_size>
<data_for_opcode1>
<opcode2_that_doesnt_need_data>
<align_to_data_size>
<opcode3_that_needs_data>
<align_to_data_size>
<data_for_opcode3>
…
Path data in the array should always be 1-, 2-, or 4-byte aligned, depending on the format:
For example, for 32-bit (4-byte) data types:
…
<opcode1_that_needs_data>
<pad to 4 bytes>
<4 byte data_for_opcode1>
<opcode2_that_doesnt_need_data>
<pad to 4 bytes>
<opcode3_that_needs_data>
<pad to 4 bytes>
<4 byte data_for_opcode3>
…
Parent topic:Vector path structures