VKVG
Vulkan Vector Graphics
|
This is the reference documentation for VKVG contexts used to draw on Surface.
Typedefs | |
typedef struct _vkvg_context_t * | VkvgContext |
The Vkvg drawing Context. More... | |
Functions | |
VkvgContext | vkvg_create (VkvgSurface surf) |
Create a new vkvg context used for drawing on surfaces. More... | |
void | vkvg_destroy (VkvgContext ctx) |
Destroy vkvg context. More... | |
vkvg_status_t | vkvg_status (VkvgContext ctx) |
Get context status. More... | |
const char * | vkvg_status_to_string (vkvg_status_t status) |
VkvgContext | vkvg_reference (VkvgContext ctx) |
Increment by one the reference count on this context. More... | |
uint32_t | vkvg_get_reference_count (VkvgContext ctx) |
Get the current reference count of this context. More... | |
void | vkvg_flush (VkvgContext ctx) |
Perform all the pending drawing operations on a context. More... | |
void | vkvg_new_path (VkvgContext ctx) |
Start a new empty path. More... | |
void | vkvg_close_path (VkvgContext ctx) |
Close the current path. More... | |
void | vkvg_new_sub_path (VkvgContext ctx) |
Start a new sub path. More... | |
void | vkvg_path_extents (VkvgContext ctx, float *x1, float *y1, float *x2, float *y2) |
vkvg_path_extents More... | |
void | vkvg_get_current_point (VkvgContext ctx, float *x, float *y) |
Get the current point. More... | |
void | vkvg_line_to (VkvgContext ctx, float x, float y) |
Add a line to the current path from the current point to the coordinate given in arguments. More... | |
void | vkvg_rel_line_to (VkvgContext ctx, float dx, float dy) |
Add a line to the current path from the current point to the coordinate relative to it. More... | |
void | vkvg_move_to (VkvgContext ctx, float x, float y) |
Move the context pen to the position given in argument. More... | |
void | vkvg_rel_move_to (VkvgContext ctx, float x, float y) |
Move the context pen relative to the current point. More... | |
void | vkvg_arc (VkvgContext ctx, float xc, float yc, float radius, float a1, float a2) |
Adds a circular arc of the given radius to the current path. More... | |
void | vkvg_arc_negative (VkvgContext ctx, float xc, float yc, float radius, float a1, float a2) |
Add a circular arc in counter clockwise order to the current path. More... | |
void | vkvg_curve_to (VkvgContext ctx, float x1, float y1, float x2, float y2, float x3, float y3) |
Adds a cubic Bézier spline to the current path. More... | |
void | vkvg_rel_curve_to (VkvgContext ctx, float x1, float y1, float x2, float y2, float x3, float y3) |
Adds a cubic Bézier spline to the current path relative to the current point. More... | |
void | vkvg_quadratic_to (VkvgContext ctx, float x1, float y1, float x2, float y2) |
Add a quadratic Bezizer curve to the current path. More... | |
void | vkvg_rel_quadratic_to (VkvgContext ctx, float x1, float y1, float x2, float y2) |
Add a quadratic Bezizer curve to the current path relative to the current point. More... | |
vkvg_status_t | vkvg_rectangle (VkvgContext ctx, float x, float y, float w, float h) |
Add an axis aligned rectangle subpath to the current path. More... | |
vkvg_status_t | vkvg_rounded_rectangle (VkvgContext ctx, float x, float y, float w, float h, float radius) |
Add an axis aligned rectangle with rounded corners to the current path. More... | |
void | vkvg_rounded_rectangle2 (VkvgContext ctx, float x, float y, float w, float h, float rx, float ry) |
Add an axis aligned rectangle with rounded corners defined in both axis to the current path. More... | |
void | vkvg_ellipse (VkvgContext ctx, float radiusX, float radiusY, float x, float y, float rotationAngle) |
Add a closed ellipse to the current path. More... | |
void | vkvg_elliptic_arc_to (VkvgContext ctx, float x, float y, bool large_arc_flag, bool sweep_flag, float rx, float ry, float phi) |
Add an elliptical arc to the current path. More... | |
void | vkvg_rel_elliptic_arc_to (VkvgContext ctx, float x, float y, bool large_arc_flag, bool sweep_flag, float rx, float ry, float phi) |
Add an elliptical arc to the current path. More... | |
void | vkvg_stroke (VkvgContext ctx) |
Stroke command. More... | |
void | vkvg_stroke_preserve (VkvgContext ctx) |
Stroke command that preserve current path. More... | |
void | vkvg_fill (VkvgContext ctx) |
Fill command. More... | |
void | vkvg_fill_preserve (VkvgContext ctx) |
Fill command that preserve current path. More... | |
void | vkvg_paint (VkvgContext ctx) |
Paint command. More... | |
void | vkvg_clear (VkvgContext ctx) |
Clear surface. More... | |
void | vkvg_reset_clip (VkvgContext ctx) |
Reset the current clip region. More... | |
void | vkvg_clip (VkvgContext ctx) |
Establishes a new clip region. More... | |
void | vkvg_clip_preserve (VkvgContext ctx) |
Establishes a new clip region preserving the current path. More... | |
void | vkvg_set_opacity (VkvgContext ctx, float opacity) |
Set global opacity for drawing operations. More... | |
float | vkvg_get_opacity (VkvgContext ctx) |
Get current opacity. More... | |
void | vkvg_set_source_color (VkvgContext ctx, uint32_t c) |
Set current source for drawing to the solid color defined by the supplied 32bit integer. More... | |
void | vkvg_set_source_rgba (VkvgContext ctx, float r, float g, float b, float a) |
set color with alpha. More... | |
void | vkvg_set_source_rgb (VkvgContext ctx, float r, float g, float b) |
set opaque color as new source. More... | |
void | vkvg_set_line_width (VkvgContext ctx, float width) |
set line width for the next draw command. More... | |
void | vkvg_set_miter_limit (VkvgContext ctx, float limit) |
set line join miter size limit. More... | |
float | vkvg_get_miter_limit (VkvgContext ctx) |
Gets the current miter limit. More... | |
void | vkvg_set_line_cap (VkvgContext ctx, vkvg_line_cap_t cap) |
set line terminations for the next draw command. More... | |
void | vkvg_set_line_join (VkvgContext ctx, vkvg_line_join_t join) |
set line joins for the next draw command. More... | |
void | vkvg_set_source_surface (VkvgContext ctx, VkvgSurface surf, float x, float y) |
use supplied surface as current pattern. More... | |
void | vkvg_set_source (VkvgContext ctx, VkvgPattern pat) |
set supplied pattern as current source. More... | |
void | vkvg_set_operator (VkvgContext ctx, vkvg_operator_t op) |
void | vkvg_set_fill_rule (VkvgContext ctx, vkvg_fill_rule_t fr) |
void | vkvg_set_dash (VkvgContext ctx, const float *dashes, uint32_t num_dashes, float offset) |
set the dash configuration for strokes More... | |
void | vkvg_get_dash (VkvgContext ctx, const float *dashes, uint32_t *num_dashes, float *offset) |
get current dash settings. More... | |
float | vkvg_get_line_width (VkvgContext ctx) |
get current line width More... | |
vkvg_line_cap_t | vkvg_get_line_cap (VkvgContext ctx) |
vkvg_line_join_t | vkvg_get_line_join (VkvgContext ctx) |
vkvg_operator_t | vkvg_get_operator (VkvgContext ctx) |
vkvg_fill_rule_t | vkvg_get_fill_rule (VkvgContext ctx) |
Get current fill rule. More... | |
VkvgPattern | vkvg_get_source (VkvgContext ctx) |
Get the current source of the context. More... | |
VkvgSurface | vkvg_get_target (VkvgContext ctx) |
Get the current target of the context. More... | |
bool | vkvg_has_current_point (VkvgContext ctx) |
Check if context has a current point defined. More... | |
void | vkvg_save (VkvgContext ctx) |
Save context's graphic states. More... | |
void | vkvg_restore (VkvgContext ctx) |
Restore context's graphic states. More... | |
void | vkvg_translate (VkvgContext ctx, float dx, float dy) |
Add a translation to the current transformation matrix. More... | |
void | vkvg_scale (VkvgContext ctx, float sx, float sy) |
Add a scaling transform to the current transformation matrix. More... | |
void | vkvg_rotate (VkvgContext ctx, float radians) |
Add a rotation to the current transformation matrix. More... | |
void | vkvg_transform (VkvgContext ctx, const vkvg_matrix_t *matrix) |
Add an additional transformation to the current matrix. More... | |
void | vkvg_set_matrix (VkvgContext ctx, const vkvg_matrix_t *matrix) |
Set the current matrix. More... | |
void | vkvg_get_matrix (VkvgContext ctx, const vkvg_matrix_t *matrix) |
Get the current matrix. More... | |
void | vkvg_identity_matrix (VkvgContext ctx) |
Set the current matrix to identity. More... | |
void | vkvg_select_font_face (VkvgContext ctx, const char *name) |
Try find font with the specified name using the FontConfig library. More... | |
void | vkvg_load_font_from_path (VkvgContext ctx, const char *path, const char *name) |
Select a new font by providing its file path. More... | |
void | vkvg_load_font_from_memory (VkvgContext ctx, unsigned char *fontBuffer, long fontBufferByteSize, const char *name) |
Select a new font by providing a pointer on the font file loaded in memory and its size in byte. More... | |
void | vkvg_set_font_size (VkvgContext ctx, uint32_t size) |
void | vkvg_show_text (VkvgContext ctx, const char *utf8) |
Show a string of text. More... | |
void | vkvg_text_extents (VkvgContext ctx, const char *utf8, vkvg_text_extents_t *extents) |
Gets the extents for a string of text. More... | |
void | vkvg_font_extents (VkvgContext ctx, vkvg_font_extents_t *extents) |
Gets the font extents for the currently selected font. More... | |
VkvgText | vkvg_text_run_create (VkvgContext ctx, const char *text) |
Create a new text run. More... | |
VkvgText | vkvg_text_run_create_with_length (VkvgContext ctx, const char *text, uint32_t length) |
Create a new text run for a non null terminated string. More... | |
void | vkvg_text_run_destroy (VkvgText textRun) |
Release ressources holded by the text run. More... | |
void | vkvg_show_text_run (VkvgContext ctx, VkvgText textRun) |
void | vkvg_text_run_get_extents (VkvgText textRun, vkvg_text_extents_t *extents) |
uint32_t | vkvg_text_run_get_glyph_count (VkvgText textRun) |
Get glyph count of text run. More... | |
void | vkvg_text_run_get_glyph_position (VkvgText textRun, uint32_t index, vkvg_glyph_info_t *pGlyphInfo) |
retrieve glyph positions. More... | |