Vector Graphics Object is the scene graph for managing vector graphics objects. More...
Modules | |
Vector Graphics Node Functions | |
Vector Graphics Shape Functions | |
Data Structures | |
struct | _Evas_Vg_Gradient_Stop |
Type defining gradient stops. More... | |
struct | _Evas_Vg_Dash |
Type describing dash. More... | |
Typedefs | |
typedef enum Evas_Vg_Cap_Type | Evas_Vg_Cap |
These values determine how the end of opened sub-paths are rendered in a stroke. More... | |
typedef enum Evas_Vg_Join_Type | Evas_Vg_Join |
These values determine how two joining lines are rendered in a stroker. More... | |
typedef enum Evas_Vg_Path_Command_Type | Evas_Vg_Path_Command |
These values determine how the points are interpreted in a stream of points. More... | |
typedef struct _Evas_Vg_Gradient_Stop | Evas_Vg_Gradient_Stop |
Type defining gradient stops. More... | |
typedef enum Evas_Vg_Gradient_Spread_Type | Evas_Vg_Gradient_Spread |
Specifies how the area outside the gradient area should be filled. More... | |
typedef struct _Evas_Vg_Dash | Evas_Vg_Dash |
Type describing dash. More... | |
Functions | |
EVAS_API void | evas_object_vg_fill_mode_set (Evas_Object *obj, Evas_Object_Vg_Fill_Mode fill_mode) |
Control how the viewbox is mapped to the vg canvas's viewport. More... | |
EVAS_API Evas_Object_Vg_Fill_Mode | evas_object_vg_fill_mode_get (const Evas_Object *obj) |
Control how the viewbox is mapped to the vg canvas's viewport. More... | |
EVAS_API void | evas_object_vg_viewbox_set (Evas_Object *obj, Eina_Rect viewbox) |
Sets the viewbox for the evas vg canvas. More... | |
EVAS_API Eina_Rect | evas_object_vg_viewbox_get (const Evas_Object *obj) |
Get the current viewbox from the evas_object_vg. More... | |
EVAS_API void | evas_object_vg_viewbox_align_set (Evas_Object *obj, double align_x, double align_y) |
Control how the viewbox is positioned inside the viewport. More... | |
EVAS_API void | evas_object_vg_viewbox_align_get (const Evas_Object *obj, double *align_x, double *align_y) |
Control how the viewbox is positioned inside the viewport. More... | |
EVAS_API void | evas_object_vg_root_node_set (Evas_Object *obj, Evas_Vg_Node *root) |
Set the root node of the evas_object_vg. More... | |
EVAS_API Evas_Vg_Node * | evas_object_vg_root_node_get (const Evas_Object *obj) |
Get the root node of the evas_object_vg. More... | |
EVAS_API Evas_Object * | evas_object_vg_add (Evas *e) |
Creates a new vector object on the given Evas e canvas. More... | |
EVAS_API int | evas_object_vg_animated_frame_count_get (const Evas_Object *obj) |
Get the total number of frames of the vector, if it's animated. More... | |
EVAS_API double | evas_object_vg_animated_frame_duration_get (const Evas_Object *obj, int start_frame, int frame_num) |
Get the duration of a sequence of frames. More... | |
EVAS_API Eina_Bool | evas_object_vg_file_set (Evas_Object *obj, const char *file, const char *key) |
Set the source file from where an vector object must fetch the real vector data (it may be one of json, svg, eet files). More... | |
EVAS_API Eina_Bool | evas_object_vg_animated_frame_set (Evas_Object *obj, int frame_index) |
Set current frame of animated vector object. More... | |
EVAS_API int | evas_object_vg_animated_frame_get (const Evas_Object *obj) |
Get the current frame number of animated vector object. More... | |
EVAS_API Evas_Vg_Shape * | evas_vg_shape_add (Evas_Vg_Container *parent) |
Creates a new vector shape object. More... | |
EVAS_API Evas_Vg_Container * | evas_vg_container_add (Evas_Object *parent) |
Creates a new vector container object. More... | |
EVAS_API Eina_Bool | evas_vg_node_visible_get (Evas_Vg_Node *obj) |
Retrieves whether or not the given Evas_Vg_Node object is visible. More... | |
EVAS_API void | evas_vg_node_visible_set (Evas_Vg_Node *obj, Eina_Bool v) |
Makes the given Evas_Vg_Node object visible or invisible. More... | |
EVAS_API void | evas_vg_node_color_get (Evas_Vg_Node *obj, int *r, int *g, int *b, int *a) |
Retrieves the general/main color of the given Evas_Vg_Node object. More... | |
EVAS_API void | evas_vg_node_color_set (Evas_Vg_Node *obj, int r, int g, int b, int a) |
Sets the general/main color of the given Evas_Vg_Node object to the given one. More... | |
EVAS_API void | evas_vg_node_geometry_get (Evas_Vg_Node *obj, int *x, int *y, int *w, int *h) |
Retrieves the geometry of the given Evas_Vg_Node object. More... | |
EVAS_API void | evas_vg_node_geometry_set (Evas_Vg_Node *obj, int x, int y, int w, int h) EINA_DEPRECATED |
Changes the geometry of the given Evas_Vg_Node object. More... | |
EVAS_API void | evas_vg_node_stack_below (Evas_Vg_Node *obj, Evas_Vg_Node *below) |
Stack obj immediately below below . More... | |
EVAS_API void | evas_vg_node_stack_above (Evas_Vg_Node *obj, Evas_Vg_Node *above) |
Stack obj immediately above above . More... | |
EVAS_API void | evas_vg_node_raise (Evas_Vg_Node *obj) |
Raise obj to the top of its layer. More... | |
EVAS_API void | evas_vg_node_lower (Evas_Vg_Node *obj) |
Lower obj to the bottom of its layer. More... | |
EVAS_API double | evas_vg_shape_stroke_scale_get (Evas_Vg_Shape *obj) |
Get the stroke scaling factor used for stroking this path. More... | |
EVAS_API void | evas_vg_shape_stroke_scale_set (Evas_Vg_Shape *obj, double s) |
Sets the stroke scale to be used for stroking the path. More... | |
EVAS_API void | evas_vg_shape_stroke_color_get (Evas_Vg_Shape *obj, int *r, int *g, int *b, int *a) |
Gets the color used for stroking the path. More... | |
EVAS_API void | evas_vg_shape_stroke_color_set (Evas_Vg_Shape *obj, int r, int g, int b, int a) |
Sets the color to be used for stroking the path. More... | |
EVAS_API double | evas_vg_shape_stroke_width_get (Evas_Vg_Shape *obj) |
Gets the stroke width to be used for stroking the path. More... | |
EVAS_API void | evas_vg_shape_stroke_width_set (Evas_Vg_Shape *obj, double w) |
Sets the stroke width to be used for stroking the path. More... | |
EVAS_API double | evas_vg_shape_stroke_location_get (Evas_Vg_Shape *obj) |
Gets the stroke location to be used for stroking the path. More... | |
EVAS_API void | evas_vg_shape_stroke_location_set (Evas_Vg_Shape *obj, double centered) |
Sets the stroke location to be used for stroking the path. More... | |
EVAS_API void | evas_vg_shape_stroke_dash_get (Evas_Vg_Shape *obj, const Evas_Vg_Dash **dash, unsigned int *length) |
Gets the stroke dash type used for stroking path. More... | |
EVAS_API void | evas_vg_shape_stroke_dash_set (Evas_Vg_Shape *obj, const Evas_Vg_Dash *dash, unsigned int length) |
Sets the stroke dash type to be used for stroking the path. More... | |
EVAS_API Evas_Vg_Cap | evas_vg_shape_stroke_cap_get (Evas_Vg_Shape *obj) |
Gets the cap style used for stroking path. More... | |
EVAS_API void | evas_vg_shape_stroke_cap_set (Evas_Vg_Shape *obj, Evas_Vg_Cap c) |
Sets the cap style to be used for stroking the path. More... | |
EVAS_API Evas_Vg_Join | evas_vg_shape_stroke_join_get (Evas_Vg_Shape *obj) |
Gets the join style used for stroking path. More... | |
EVAS_API void | evas_vg_shape_stroke_join_set (Evas_Vg_Shape *obj, Evas_Vg_Join j) |
Sets the join style to be used for stroking the path. More... | |
EVAS_API void | evas_vg_shape_path_set (Evas_Vg_Shape *obj, const Evas_Vg_Path_Command *op, const double *points) |
Set the list of commands and points to be used to create the content of shape. More... | |
EVAS_API void | evas_vg_shape_path_get (Evas_Vg_Shape *obj, const Evas_Vg_Path_Command **op, const double **points) |
Gets the command and points list. More... | |
EVAS_API void | evas_vg_shape_path_length_get (Evas_Vg_Shape *obj, unsigned int *commands, unsigned int *points) |
Gets the command and points length. More... | |
EVAS_API void | evas_vg_shape_current_get (Evas_Vg_Shape *obj, double *x, double *y) |
Gets the current points. More... | |
EVAS_API void | evas_vg_shape_current_ctrl_get (Evas_Vg_Shape *obj, double *x, double *y) |
Gets the current control points. More... | |
EVAS_API void | evas_vg_shape_dup (Evas_Vg_Shape *obj, Evas_Vg_Shape *dup_from) |
Copy the shape data from the object specified. More... | |
EVAS_API void | evas_vg_shape_reset (Evas_Vg_Shape *obj) |
Reset the shape data of the shape object. More... | |
EVAS_API void | evas_vg_shape_append_move_to (Evas_Vg_Shape *obj, double x, double y) |
Moves the current point to the given point, implicitly starting a new subpath and closing the previous one. More... | |
EVAS_API void | evas_vg_shape_append_line_to (Evas_Vg_Shape *obj, double x, double y) |
Adds a straight line from the current position to the given endPoint. More... | |
EVAS_API void | evas_vg_shape_append_quadratic_to (Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y) |
Adds a quadratic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x, ctrl_y). More... | |
EVAS_API void | evas_vg_shape_append_squadratic_to (Evas_Vg_Shape *obj, double x, double y) |
Same as evas_vg_shape_append_quadratic_to() api only difference is that it uses the current control point to draw the bezier. More... | |
EVAS_API void | evas_vg_shape_append_cubic_to (Evas_Vg_Shape *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1) |
Adds a cubic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x0, ctrl_y0), and (ctrl_x1, ctrl_y1). More... | |
EVAS_API void | evas_vg_shape_append_scubic_to (Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y) |
Same as evas_vg_shape_append_cubic_to() api only difference is that it uses the current control point to draw the bezier. More... | |
EVAS_API void | evas_vg_shape_append_arc_to (Evas_Vg_Shape *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep) |
Append an arc that connects from the current point int the point list to the given point (x,y). More... | |
EVAS_API void | evas_vg_shape_append_arc (Evas_Vg_Shape *obj, double x, double y, double w, double h, double start_angle, double sweep_length) |
Append an arc that enclosed in the given rectangle (x, y, w, h). More... | |
EVAS_API void | evas_vg_shape_append_close (Evas_Vg_Shape *obj) |
Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path. More... | |
EVAS_API void | evas_vg_shape_append_circle (Evas_Vg_Shape *obj, double x, double y, double radius) |
Append a circle with given center and radius. More... | |
EVAS_API void | evas_vg_shape_append_rect (Evas_Vg_Shape *obj, double x, double y, double w, double h, double rx, double ry) |
Append the given rectangle with rounded corner to the path. More... | |
EVAS_API void | evas_vg_shape_append_svg_path (Evas_Vg_Shape *obj, const char *svg_path_data) |
Append the SVG path data. More... | |
EVAS_API Eina_Bool | evas_vg_shape_interpolate (Evas_Vg_Shape *obj, const Eo *from, const Eo *to, double pos_map) |
Creates intermediary path part-way between two paths. More... | |
EVAS_API Eina_Bool | evas_vg_shape_equal_commands (Evas_Vg_Shape *obj, const Eo *with) |
Check if the given objects have equal commands. More... | |
EVAS_API void | evas_vg_shape_fill_set (Evas_Vg_Shape *obj, Evas_Vg_Node *f) |
Set a vg object as the fill property. More... | |
EVAS_API Evas_Vg_Node * | evas_vg_shape_fill_get (const Evas_Vg_Shape *obj) |
Returns the object that is set for the fill property. More... | |
EVAS_API void | evas_vg_shape_stroke_fill_set (Evas_Vg_Shape *obj, Evas_Vg_Node *f) |
Set a vg object as the stroke fill property. More... | |
EVAS_API Evas_Vg_Node * | evas_vg_shape_stroke_fill_get (const Evas_Vg_Shape *obj) |
Returns the object that is set for the stroke fill property. More... | |
EVAS_API void | evas_vg_gradient_stop_set (Evas_Vg_Gradient *obj, const Evas_Vg_Gradient_Stop *colors, unsigned int length) |
Set the list of color stops for the gradient. More... | |
EVAS_API void | evas_vg_gradient_stop_get (Evas_Vg_Gradient *obj, const Evas_Vg_Gradient_Stop **colors, unsigned int *length) |
Get the list of color stops. More... | |
EVAS_API void | evas_vg_gradient_spread_set (Evas_Vg_Gradient *obj, Evas_Vg_Gradient_Spread s) |
Specifies the spread method that should be used for this gradient. More... | |
EVAS_API Evas_Vg_Gradient_Spread | evas_vg_gradient_spread_get (Evas_Vg_Gradient *obj) |
Returns the spread method use by this gradient. More... | |
EVAS_API Evas_Vg_Gradient_Linear * | evas_vg_gradient_linear_add (Evas_Vg_Container *parent) |
Creates a new linear gradient object. More... | |
EVAS_API void | evas_vg_gradient_linear_start_set (Evas_Vg_Gradient_Linear *obj, double x, double y) |
Sets the start point of this linear gradient. More... | |
EVAS_API void | evas_vg_gradient_linear_start_get (Evas_Vg_Gradient_Linear *obj, double *x, double *y) |
Gets the start point of this linear gradient. More... | |
EVAS_API void | evas_vg_gradient_linear_end_set (Evas_Vg_Gradient_Linear *obj, double x, double y) |
Sets the end point of this linear gradient. More... | |
EVAS_API void | evas_vg_gradient_linear_end_get (Evas_Vg_Gradient_Linear *obj, double *x, double *y) |
Gets the end point of this linear gradient. More... | |
EVAS_API Evas_Vg_Gradient_Radial * | evas_vg_gradient_radial_add (Evas_Vg_Container *parent) |
Creates a new radial gradient object. More... | |
EVAS_API void | evas_vg_gradient_radial_center_set (Evas_Vg_Gradient_Radial *obj, double x, double y) |
Sets the center of this radial gradient. More... | |
EVAS_API void | evas_vg_gradient_radial_center_get (Evas_Vg_Gradient_Radial *obj, double *x, double *y) |
Gets the center of this radial gradient. More... | |
EVAS_API void | evas_vg_gradient_radial_radius_set (Evas_Vg_Gradient_Radial *obj, double r) |
Sets the center radius of this radial gradient. More... | |
EVAS_API double | evas_vg_gradient_radial_radius_get (Evas_Vg_Gradient_Radial *obj) |
Gets the center radius of this radial gradient. More... | |
EVAS_API void | evas_vg_gradient_radial_focal_set (Evas_Vg_Gradient_Radial *obj, double x, double y) |
Sets the focal point of this radial gradient. More... | |
EVAS_API void | evas_vg_gradient_radial_focal_get (Evas_Vg_Gradient_Radial *obj, double *x, double *y) |
Gets the focal point of this radial gradient. More... | |
Vector Graphics Object is the scene graph for managing vector graphics objects.
User can create shape objects as well as fill objects and give them to the Evas_Object_Vg for drawing on the screen as well as managing the lifecycle of the objects, enabling reuse of shape objects.
Since Evas_Object_Vg is an Evas_Object all operations applicable to an Evas_Object can be performed on it (clipping, mapping, etc).
To create complex vector graphics you can create a hierarchy of shape and fill objects and give the hierarchy to Evas_Object which will be responsible for drawing and showing on the screen.
As the shape object and fill object (linear and radial gradients) have retain mode API, you only have to create it once and set the properties and give it to Evas_Object_Vg.
Any change in the properties of a shape or fill object are automatically notified to Evas_Object_Vg triggering a redraw to reflect the changes.
To create a vector path, you can give a list of path commands to the shape object using efl_gfx_shape_path_set() API.
Below are the list of features currently supported by Vector object.
Example:
typedef enum Evas_Vg_Cap_Type Evas_Vg_Cap |
These values determine how the end of opened sub-paths are rendered in a stroke.
typedef enum Evas_Vg_Join_Type Evas_Vg_Join |
These values determine how two joining lines are rendered in a stroker.
typedef enum Evas_Vg_Path_Command_Type Evas_Vg_Path_Command |
These values determine how the points are interpreted in a stream of points.
typedef struct _Evas_Vg_Gradient_Stop Evas_Vg_Gradient_Stop |
Type defining gradient stops.
Describes the location and color of a transition point in a gradient.
typedef enum Evas_Vg_Gradient_Spread_Type Evas_Vg_Gradient_Spread |
Specifies how the area outside the gradient area should be filled.
typedef struct _Evas_Vg_Dash Evas_Vg_Dash |
Enumeration that defines how viewbox will be filled int the vg canvs's viewport.
default Fill_Mode is none
enum Evas_Vg_Cap_Type |
These values determine how the end of opened sub-paths are rendered in a stroke.
enum Evas_Vg_Join_Type |
These values determine how two joining lines are rendered in a stroker.
These values determine how the points are interpreted in a stream of points.
Specifies how the area outside the gradient area should be filled.
EVAS_API void evas_object_vg_fill_mode_set | ( | Evas_Object * | obj, |
Evas_Object_Vg_Fill_Mode | fill_mode | ||
) |
Control how the viewbox is mapped to the vg canvas's viewport.
[in] | obj | The object. |
[in] | fill_mode | Fill mode type |
EVAS_API Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get | ( | const Evas_Object * | obj | ) |
Control how the viewbox is mapped to the vg canvas's viewport.
[in] | obj | The object. |
EVAS_API void evas_object_vg_viewbox_set | ( | Evas_Object * | obj, |
Eina_Rect | viewbox | ||
) |
Sets the viewbox for the evas vg canvas.
viewbox if set should be mapped to the canvas geometry when rendering the vg tree.
[in] | obj | The object. |
[in] | viewbox | viewbox for the vg canvas |
EVAS_API Eina_Rect evas_object_vg_viewbox_get | ( | const Evas_Object * | obj | ) |
Get the current viewbox from the evas_object_vg.
[in] | obj | The object. |
EVAS_API void evas_object_vg_viewbox_align_set | ( | Evas_Object * | obj, |
double | align_x, | ||
double | align_y | ||
) |
Control how the viewbox is positioned inside the viewport.
[in] | obj | The object. |
[in] | align_x | Alignment in the horizontal axis (0 <= align_x <= 1). |
[in] | align_y | Alignment in the vertical axis (0 <= align_y <= 1). |
EVAS_API void evas_object_vg_viewbox_align_get | ( | const Evas_Object * | obj, |
double * | align_x, | ||
double * | align_y | ||
) |
Control how the viewbox is positioned inside the viewport.
[in] | obj | The object. |
[out] | align_x | Alignment in the horizontal axis (0 <= align_x <= 1). |
[out] | align_y | Alignment in the vertical axis (0 <= align_y <= 1). |
EVAS_API void evas_object_vg_root_node_set | ( | Evas_Object * | obj, |
Evas_Vg_Node * | root | ||
) |
Set the root node of the evas_object_vg.
It takes the ownership of the root node.
[in] | obj | The object. |
[in] | root | Root node(Evas_Vg_Container) of the VG canvas. |
EVAS_API Evas_Vg_Node * evas_object_vg_root_node_get | ( | const Evas_Object * | obj | ) |
Get the root node of the evas_object_vg.
[in] | obj | The object. |
EVAS_API Evas_Object * evas_object_vg_add | ( | Evas * | e | ) |
Creates a new vector object on the given Evas e
canvas.
The shape object hierarchy can be added to the evas_object_vg by accessing the root node of the vg canvas and adding the hierarchy as child to the root node.
[in] | e | The given canvas. |
References EINA_SAFETY_ON_FALSE_RETURN_VAL, and EVAS_CANVAS_CLASS.
EVAS_API int evas_object_vg_animated_frame_count_get | ( | const Evas_Object * | obj | ) |
Get the total number of frames of the vector, if it's animated.
EVAS_API double evas_object_vg_animated_frame_duration_get | ( | const Evas_Object * | obj, |
int | start_frame, | ||
int | frame_num | ||
) |
Get the duration of a sequence of frames.
This returns total duration in seconds that the specified sequence of frames should take.
If start_frame
is 1 and frame_num
is 0, this returns the duration of frame 1. If start_frame
is 1 and frame_num
is 1, this returns the total duration of frame 1 + frame 2.
[in] | start_frame | The first frame, ranges from 1 to maximum frame count. |
[in] | frame_num | Number of frames in the sequence, starts from 0. |
EVAS_API Eina_Bool evas_object_vg_file_set | ( | Evas_Object * | obj, |
const char * | file, | ||
const char * | key | ||
) |
Set the source file from where an vector object must fetch the real vector data (it may be one of json, svg, eet files).
If the file supports multiple data stored in it (as Eet files do), you can specify the key to be used as the index of the vector in this file.
[in] | file | The vector file path. |
[in] | key | The vector key in file (if its an Eet one), or NULL , otherwise. |
EINA_TRUE
if it's succeed to read file, EINA_FALSE
otherwise.EVAS_API Eina_Bool evas_object_vg_animated_frame_set | ( | Evas_Object * | obj, |
int | frame_index | ||
) |
Set current frame of animated vector object.
[in] | frame_index | The index of current frame. |
frame_index
must be in range of animation frames. (0 ~ max frame count)EINA_TRUE
, if the frame index is valid. EINA_FALSE
, otherwise.EVAS_API int evas_object_vg_animated_frame_get | ( | const Evas_Object * | obj | ) |
Get the current frame number of animated vector object.
EVAS_API Evas_Vg_Shape * evas_vg_shape_add | ( | Evas_Vg_Container * | parent | ) |
Creates a new vector shape object.
[in] | parent | The given vector container object. |
References ERR.
EVAS_API Evas_Vg_Container * evas_vg_container_add | ( | Evas_Object * | parent | ) |
Creates a new vector container object.
[in] | parent | The given vector container object. |
References ERR.
EVAS_API Eina_Bool evas_vg_node_visible_get | ( | Evas_Vg_Node * | obj | ) |
Retrieves whether or not the given Evas_Vg_Node object is visible.
[in] | obj | The object. |
EINA_TRUE
if the object is visible, EINA_FALSE
otherwise.EVAS_API void evas_vg_node_visible_set | ( | Evas_Vg_Node * | obj, |
Eina_Bool | v | ||
) |
Makes the given Evas_Vg_Node object visible or invisible.
[in] | obj | The object. |
[in] | v | EINA_TRUE if to make the object visible, EINA_FALSE otherwise. |
EVAS_API void evas_vg_node_color_get | ( | Evas_Vg_Node * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Retrieves the general/main color of the given Evas_Vg_Node object.
Retrieves the “main” color's RGB component (and alpha channel) values, which range from 0 to 255. For the alpha channel, which defines the object's transparency level, 0 means totally transparent, while 255 means opaque. These color values are premultiplied by the alpha value.
NULL
pointers on the components you're not interested in: they'll be ignored by the function.[in] | obj | The object. |
[out] | r | The red component of the given color. |
[out] | g | The green component of the given color. |
[out] | b | The blue component of the given color. |
[out] | a | The alpha component of the given color. |
EVAS_API void evas_vg_node_color_set | ( | Evas_Vg_Node * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the general/main color of the given Evas_Vg_Node object to the given one.
a
.[in] | obj | The object. |
[in] | r | The red component of the given color. |
[in] | g | The green component of the given color. |
[in] | b | The blue component of the given color. |
[in] | a | The alpha component of the given color. |
EVAS_API void evas_vg_node_geometry_get | ( | Evas_Vg_Node * | obj, |
int * | x, | ||
int * | y, | ||
int * | w, | ||
int * | h | ||
) |
Retrieves the geometry of the given Evas_Vg_Node object.
[in] | obj | The object. |
[out] | x | The x geometry of the given object. |
[out] | y | The y geometry of the given object. |
[out] | w | The w geometry of the given object. |
[out] | h | The h geometry of the given object. |
EVAS_API void evas_vg_node_geometry_set | ( | Evas_Vg_Node * | obj, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Changes the geometry of the given Evas_Vg_Node object.
[in] | obj | The object. |
[in] | x | The x geometry of the given object. |
[in] | y | The y geometry of the given object. |
[in] | w | The w geometry of the given object. |
[in] | h | The h geometry of the given object. |
References EINA_POSITION2D, and EINA_SIZE2D.
EVAS_API void evas_vg_node_stack_below | ( | Evas_Vg_Node * | obj, |
Evas_Vg_Node * | below | ||
) |
Stack obj
immediately below below
.
Objects, in a given canvas, are stacked in the order they get added to it. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
This function is intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
If you have smart objects on your canvas and obj
is a member of one of them, then below
must also be a member of the same smart object.
Similarly, if obj
is not a member of a smart object, below
must not be either.
[in] | obj | The object. |
[in] | below | The object below which to stack. |
EVAS_API void evas_vg_node_stack_above | ( | Evas_Vg_Node * | obj, |
Evas_Vg_Node * | above | ||
) |
Stack obj
immediately above above
.
Objects, in a given canvas, are stacked in the order they get added to it. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
This function is intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
If you have smart objects on your canvas and obj
is a member of one of them, then above
must also be a member of the same smart object.
Similarly, if obj
is not a member of a smart object, above
must not be either.
[in] | obj | The object. |
[in] | above | The object above which to stack. |
EVAS_API void evas_vg_node_raise | ( | Evas_Vg_Node * | obj | ) |
Raise obj
to the top of its layer.
obj
will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched.
[in] | obj | The object. |
EVAS_API void evas_vg_node_lower | ( | Evas_Vg_Node * | obj | ) |
Lower obj
to the bottom of its layer.
obj
will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched.
[in] | obj | The object. |
EVAS_API double evas_vg_shape_stroke_scale_get | ( | Evas_Vg_Shape * | obj | ) |
Get the stroke scaling factor used for stroking this path.
[in] | obj | The object. |
EVAS_API void evas_vg_shape_stroke_scale_set | ( | Evas_Vg_Shape * | obj, |
double | s | ||
) |
Sets the stroke scale to be used for stroking the path.
the scale property will be used along with stroke width property.
[in] | obj | The object. |
[in] | s | The stroke scale value. |
EVAS_API void evas_vg_shape_stroke_color_get | ( | Evas_Vg_Shape * | obj, |
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Gets the color used for stroking the path.
[in] | obj | The object. |
[out] | r | The red component of the given color. |
[out] | g | The green component of the given color. |
[out] | b | The blue component of the given color. |
[out] | a | The alpha component of the given color. |
EVAS_API void evas_vg_shape_stroke_color_set | ( | Evas_Vg_Shape * | obj, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the color to be used for stroking the path.
[in] | obj | The object. |
[in] | r | The red component of the given color. |
[in] | g | The green component of the given color. |
[in] | b | The blue component of the given color. |
[in] | a | The alpha component of the given color. |
EVAS_API double evas_vg_shape_stroke_width_get | ( | Evas_Vg_Shape * | obj | ) |
Gets the stroke width to be used for stroking the path.
[in] | obj | The object. |
EVAS_API void evas_vg_shape_stroke_width_set | ( | Evas_Vg_Shape * | obj, |
double | w | ||
) |
Sets the stroke width to be used for stroking the path.
[in] | obj | The object. |
[in] | w | The stroke width to be used. |
EVAS_API double evas_vg_shape_stroke_location_get | ( | Evas_Vg_Shape * | obj | ) |
Gets the stroke location to be used for stroking the path.
[in] | obj | The object. |
EVAS_API void evas_vg_shape_stroke_location_set | ( | Evas_Vg_Shape * | obj, |
double | centered | ||
) |
Sets the stroke location to be used for stroking the path.
[in] | obj | The object. |
[in] | centered | The stroke location. |
EVAS_API void evas_vg_shape_stroke_dash_get | ( | Evas_Vg_Shape * | obj, |
const Evas_Vg_Dash ** | dash, | ||
unsigned int * | length | ||
) |
Gets the stroke dash type used for stroking path.
[in] | obj | The object. |
[out] | dash | The dash types. |
[out] | length | The length of dash types. |
EVAS_API void evas_vg_shape_stroke_dash_set | ( | Evas_Vg_Shape * | obj, |
const Evas_Vg_Dash * | dash, | ||
unsigned int | length | ||
) |
Sets the stroke dash type to be used for stroking the path.
[in] | obj | The object. |
[in] | dash | The dash types. |
[in] | length | The length of dash types. |
EVAS_API Evas_Vg_Cap evas_vg_shape_stroke_cap_get | ( | Evas_Vg_Shape * | obj | ) |
Gets the cap style used for stroking path.
[in] | obj | The object. |
EVAS_API void evas_vg_shape_stroke_cap_set | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Cap | c | ||
) |
Sets the cap style to be used for stroking the path.
The cap will be used for capping the end point of a open subpath.
[in] | obj | The object. |
[in] | c | The cap style to use , default is EVAS_VG_CAP_BUTT |
EVAS_API Evas_Vg_Join evas_vg_shape_stroke_join_get | ( | Evas_Vg_Shape * | obj | ) |
Gets the join style used for stroking path.
[in] | obj | The object. |
EVAS_API void evas_vg_shape_stroke_join_set | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Join | j | ||
) |
Sets the join style to be used for stroking the path.
The join style will be used for joining the two line segment while stroking the path.
[in] | obj | The object. |
[in] | j | The join style to use, default is EVAS_VG_JOIN_MITER. |
EVAS_API void evas_vg_shape_path_set | ( | Evas_Vg_Shape * | obj, |
const Evas_Vg_Path_Command * | op, | ||
const double * | points | ||
) |
Set the list of commands and points to be used to create the content of shape.
[in] | obj | The object. |
[in] | op | The command list. |
[in] | points | The point list. |
EVAS_API void evas_vg_shape_path_get | ( | Evas_Vg_Shape * | obj, |
const Evas_Vg_Path_Command ** | op, | ||
const double ** | points | ||
) |
Gets the command and points list.
[in] | obj | The object. |
[out] | op | The command list. |
[out] | points | The point list. |
EVAS_API void evas_vg_shape_path_length_get | ( | Evas_Vg_Shape * | obj, |
unsigned int * | commands, | ||
unsigned int * | points | ||
) |
Gets the command and points length.
[in] | obj | The object. |
[out] | commands | The command length. |
[out] | points | The points length. |
EVAS_API void evas_vg_shape_current_get | ( | Evas_Vg_Shape * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the current points.
[in] | obj | The object. |
[out] | x | The x co-ordinate of current point. |
[out] | y | The y co-ordinate of current point. |
EVAS_API void evas_vg_shape_current_ctrl_get | ( | Evas_Vg_Shape * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the current control points.
[in] | obj | The object. |
[out] | x | The x co-ordinate of control point. |
[out] | y | The y co-ordinate of control point. |
EVAS_API void evas_vg_shape_dup | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Shape * | dup_from | ||
) |
Copy the shape data from the object specified.
[in] | obj | The object. |
[in] | dup_from | The Shape object from where data will be copied. |
EVAS_API void evas_vg_shape_reset | ( | Evas_Vg_Shape * | obj | ) |
Reset the shape data of the shape object.
[in] | obj | The object. |
EVAS_API void evas_vg_shape_append_move_to | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y | ||
) |
Moves the current point to the given point, implicitly starting a new subpath and closing the previous one.
[in] | obj | The object. |
[in] | x | The x co-ordinate of the current point. |
[in] | y | The y co-ordinate of the current point. |
EVAS_API void evas_vg_shape_append_line_to | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y | ||
) |
Adds a straight line from the current position to the given endPoint.
After the line is drawn, the current position is updated to be at the end point of the line.
[in] | obj | The object. |
[in] | x | The x co-ordinate of end point of the line. |
[in] | y | The y co-ordinate of end point of the line. |
EVAS_API void evas_vg_shape_append_quadratic_to | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | ctrl_x, | ||
double | ctrl_y | ||
) |
Adds a quadratic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x, ctrl_y).
After the path is drawn, the current position is updated to be at the end point of the path.
[in] | obj | The object. |
[in] | x | The x co-ordinate of end point of the line. |
[in] | y | The y co-ordinate of end point of the line. |
[in] | ctrl_x | The x co-ordinate of control point. |
[in] | ctrl_y | The y co-ordinate of control point. |
EVAS_API void evas_vg_shape_append_squadratic_to | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y | ||
) |
Same as evas_vg_shape_append_quadratic_to() api only difference is that it uses the current control point to draw the bezier.
[in] | obj | The object. |
[in] | x | The x co-ordinate of end point of the line. |
[in] | y | The y co-ordinate of end point of the line. |
EVAS_API void evas_vg_shape_append_cubic_to | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | ctrl_x0, | ||
double | ctrl_y0, | ||
double | ctrl_x1, | ||
double | ctrl_y1 | ||
) |
Adds a cubic Bezier curve between the current position and the given end point (x,y) using the control points specified by (ctrl_x0, ctrl_y0), and (ctrl_x1, ctrl_y1).
After the path is drawn, the current position is updated to be at the end point of the path.
[in] | obj | The object. |
[in] | x | The x co-ordinate of end point of the line. |
[in] | y | The y co-ordinate of end point of the line. |
[in] | ctrl_x0 | The x co-ordinate of 1st control point. |
[in] | ctrl_y0 | The y co-ordinate of 1st control point. |
[in] | ctrl_x1 | The x co-ordinate of 2nd control point. |
[in] | ctrl_y1 | The y co-ordinate of 2nd control point. |
EVAS_API void evas_vg_shape_append_scubic_to | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | ctrl_x, | ||
double | ctrl_y | ||
) |
Same as evas_vg_shape_append_cubic_to() api only difference is that it uses the current control point to draw the bezier.
[in] | obj | The object. |
[in] | x | The x co-ordinate of end point of the line. |
[in] | y | The x co-ordinate of end point of the line. |
[in] | ctrl_x | The x co-ordinate of 2nd control point. |
[in] | ctrl_y | The y co-ordinate of 2nd control point. |
EVAS_API void evas_vg_shape_append_arc_to | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | rx, | ||
double | ry, | ||
double | angle, | ||
Eina_Bool | large_arc, | ||
Eina_Bool | sweep | ||
) |
Append an arc that connects from the current point int the point list to the given point (x,y).
The arc is defined by the given radius in x-direction (rx) and radius in y direction (ry).
[in] | obj | The object. |
[in] | x | The x co-ordinate of end point of the arc. |
[in] | y | The y co-ordinate of end point of the arc. |
[in] | rx | The radius of arc in x direction. |
[in] | ry | The radius of arc in y direction. |
[in] | angle | The x-axis rotation , normally 0. |
[in] | large_arc | Defines whether to draw the larger arc or smaller arc joining two point. |
[in] | sweep | Defines whether the arc will be drawn counter-clockwise or clockwise from current point to the end point taking into account the large_arc property. |
EVAS_API void evas_vg_shape_append_arc | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | w, | ||
double | h, | ||
double | start_angle, | ||
double | sweep_length | ||
) |
Append an arc that enclosed in the given rectangle (x, y, w, h).
The angle is defined in counter clock wise , use -ve angle for clockwise arc.
[in] | obj | The object. |
[in] | y | The x co-ordinate of the rect. |
[in] | y | The y co-ordinate of the rect. |
[in] | w | The width of the rect. |
[in] | h | The height of the rect. |
[in] | start_angle | The angle at which the arc will start. |
[in] | sweep_length | The length of the arc. |
EVAS_API void evas_vg_shape_append_close | ( | Evas_Vg_Shape * | obj | ) |
Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path.
The current point of the new path is (0, 0).
[in] | obj | The object. |
EVAS_API void evas_vg_shape_append_circle | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | radius | ||
) |
Append a circle with given center and radius.
[in] | obj | The object. |
[in] | x | The x co-ordinate of the center of the circle. |
[in] | y | The y co-ordinate of the center of the circle. |
[in] | radius | The radius of the circle. |
EVAS_API void evas_vg_shape_append_rect | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | w, | ||
double | h, | ||
double | rx, | ||
double | ry | ||
) |
Append the given rectangle with rounded corner to the path.
The xr and yr arguments specify the radii of the ellipses defining the corners of the rounded rectangle.
[in] | obj | The object. |
[in] | x | The x co-ordinate of the rectangle. |
[in] | y | The y co-ordinate of the rectangle. |
[in] | w | The width of the rectangle. |
[in] | h | The height of the rectangle. |
[in] | rx | The x radius of the rounded corner and should be in range [0 to w/2]. |
[in] | ry | The y radius of the rounded corner and should be in range [0 to h/2]. |
EVAS_API void evas_vg_shape_append_svg_path | ( | Evas_Vg_Shape * | obj, |
const char * | svg_path_data | ||
) |
Append the SVG path data.
[in] | obj | The object. |
[in] | svg_path_data | The svg path data to append. |
EVAS_API Eina_Bool evas_vg_shape_interpolate | ( | Evas_Vg_Shape * | obj, |
const Eo * | from, | ||
const Eo * | to, | ||
double | pos_map | ||
) |
Creates intermediary path part-way between two paths.
Sets the points of the obj
as the linear interpolation of the points in the from
and to
paths. The path's x,y position and control point coordinates are likewise interpolated.
The from
and to
paths must not already have equivalent points, and to
must contain at least as many points as from
, else the function returns false
with no interpolation performed. If to
has more points than from
, the excess points are ignored.
[in] | obj | The object. |
[in] | from | The source path. |
[in] | to | The destination path. |
[in] | pos_map | The position map in range 0.0 to 1.0. |
EVAS_API Eina_Bool evas_vg_shape_equal_commands | ( | Evas_Vg_Shape * | obj, |
const Eo * | with | ||
) |
Check if the given objects have equal commands.
[in] | obj | The object. |
[in] | with | The target object. |
false
otherwise.EVAS_API void evas_vg_shape_fill_set | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Node * | f | ||
) |
Set a vg object as the fill property.
[in] | obj | The object whose fill property gets modified. |
[in] | f | The object content to be used for filling. |
EVAS_API Evas_Vg_Node * evas_vg_shape_fill_get | ( | const Evas_Vg_Shape * | obj | ) |
Returns the object that is set for the fill property.
[in] | obj | The object whose fill property is inspected. |
EVAS_API void evas_vg_shape_stroke_fill_set | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Node * | f | ||
) |
Set a vg object as the stroke fill property.
[in] | obj | The object whose stroke fill property gets modified. |
[in] | f | The object content will be used for stroke filling. |
EVAS_API Evas_Vg_Node * evas_vg_shape_stroke_fill_get | ( | const Evas_Vg_Shape * | obj | ) |
Returns the object that is set for the stroke fill property.
[in] | obj | The object whose stroke fill property is inspected. |
EVAS_API void evas_vg_gradient_stop_set | ( | Evas_Vg_Gradient * | obj, |
const Evas_Vg_Gradient_Stop * | colors, | ||
unsigned int | length | ||
) |
Set the list of color stops for the gradient.
[in] | obj | The object. |
[in] | colors | The color stops list. |
[in] | length | The length of the list. |
EVAS_API void evas_vg_gradient_stop_get | ( | Evas_Vg_Gradient * | obj, |
const Evas_Vg_Gradient_Stop ** | colors, | ||
unsigned int * | length | ||
) |
Get the list of color stops.
[in] | obj | The object. |
[out] | colors | The color stops list. |
[out] | length | The length of the list. |
EVAS_API void evas_vg_gradient_spread_set | ( | Evas_Vg_Gradient * | obj, |
Evas_Vg_Gradient_Spread | s | ||
) |
Specifies the spread method that should be used for this gradient.
[in] | obj | The object. |
[in] | s | The spread type to be used. |
EVAS_API Evas_Vg_Gradient_Spread evas_vg_gradient_spread_get | ( | Evas_Vg_Gradient * | obj | ) |
Returns the spread method use by this gradient.
The default is EVAS_VG_GRADIENT_SPREAD_PAD.
[in] | obj | The object. |
EVAS_API Evas_Vg_Gradient_Linear * evas_vg_gradient_linear_add | ( | Evas_Vg_Container * | parent | ) |
Creates a new linear gradient object.
[in] | parent | The given vector container object. |
EVAS_API void evas_vg_gradient_linear_start_set | ( | Evas_Vg_Gradient_Linear * | obj, |
double | x, | ||
double | y | ||
) |
Sets the start point of this linear gradient.
[in] | obj | The object. |
[in] | x | The x co-ordinate of start point. |
[in] | y | The y co-ordinate of start point |
EVAS_API void evas_vg_gradient_linear_start_get | ( | Evas_Vg_Gradient_Linear * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the start point of this linear gradient.
[in] | obj | The object. |
[out] | x | The x co-ordinate of start point. |
[out] | y | The y co-ordinate of start point. |
EVAS_API void evas_vg_gradient_linear_end_set | ( | Evas_Vg_Gradient_Linear * | obj, |
double | x, | ||
double | y | ||
) |
Sets the end point of this linear gradient.
[in] | obj | The object. |
[in] | x | The x co-ordinate of end point. |
[in] | y | The y co-ordinate of end point. |
EVAS_API void evas_vg_gradient_linear_end_get | ( | Evas_Vg_Gradient_Linear * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the end point of this linear gradient.
[in] | obj | The object. |
[out] | x | The x co-ordinate of end point. |
[out] | y | The y co-ordinate of end point. |
EVAS_API Evas_Vg_Gradient_Radial * evas_vg_gradient_radial_add | ( | Evas_Vg_Container * | parent | ) |
Creates a new radial gradient object.
[in] | parent | The given vector container object. |
EVAS_API void evas_vg_gradient_radial_center_set | ( | Evas_Vg_Gradient_Radial * | obj, |
double | x, | ||
double | y | ||
) |
Sets the center of this radial gradient.
[in] | obj | The object. |
[in] | x | The x co-ordinate of center point. |
[in] | y | The y co-ordinate of center point. |
EVAS_API void evas_vg_gradient_radial_center_get | ( | Evas_Vg_Gradient_Radial * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the center of this radial gradient.
[in] | obj | The object. |
[out] | x | The x co-ordinate of center point. |
[out] | y | The y co-ordinate of center point. |
EVAS_API void evas_vg_gradient_radial_radius_set | ( | Evas_Vg_Gradient_Radial * | obj, |
double | r | ||
) |
Sets the center radius of this radial gradient.
[in] | obj | The object. |
[in] | r | The center radius. |
EVAS_API double evas_vg_gradient_radial_radius_get | ( | Evas_Vg_Gradient_Radial * | obj | ) |
Gets the center radius of this radial gradient.
[in] | obj | The object. |
EVAS_API void evas_vg_gradient_radial_focal_set | ( | Evas_Vg_Gradient_Radial * | obj, |
double | x, | ||
double | y | ||
) |
Sets the focal point of this radial gradient.
[in] | obj | The object. |
[in] | x | The x co-ordinate of focal point. |
[in] | y | The y co-ordinate of focal point. |
EVAS_API void evas_vg_gradient_radial_focal_get | ( | Evas_Vg_Gradient_Radial * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the focal point of this radial gradient.
[in] | obj | The object. |
[out] | x | The x co-ordinate of focal point. |
[out] | y | The y co-ordinate of focal point. |