Tizen Native API
6.5
|
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.
- Drawing SVG Path. You can construct a path by using api in efl_gfx_utils.h
- Gradient filling and stroking. You can fill or stroke the path using linear or radial gradient.
- See also:
- Evas_Vg_Gradient_Linear and Evas_Vg_Gradient_Radial
- Transformation support for path and gradient fill. You can apply affine transforms to path objects.
- See also:
- Eina_Matrix.
- Note:
- Below are the list of interfaces and classes that can be used to draw vector graphics using vector objects.
- Efl.Gfx.Shape
- Evas.VG_Shape
- Evas.VG_Node
- Efl.Gfx.Gradient
- Efl.Gfx.Gradient_Radial
- Efl.Gfx.Gradient_Linear
Example:
vector = evas_object_vg_add(canvas); root = evas_obj_vg_root_node_get(vector); shape = efl_add(EVAS_VG_SHAPE_CLASS, root); Efl_Gfx_Path_Command *path_cmd = NULL; double *points = NULL; efl_gfx_path_append_circle(&path_cmd, &points); * evas_vg_node_origin_set(shape, 10, 10); * efl_gfx_shape_stroke_width_set(shape, 1.0); * evas_vg_node_color_set(shape, 128, 128, 128, 80); * efl_gfx_shape_path_set(shape, path_cmd, points);
- Since (EFL) :
- 1.14
Functions | |
void | evas_object_vg_root_node_set (Evas_Object *obj, Evas_Vg_Node *root) |
Set the root node of the evas_object_vg. | |
Evas_Vg_Node * | evas_object_vg_root_node_get (const Evas_Object *obj) |
Get the root node of the evas_object_vg. | |
Evas_Object * | evas_object_vg_add (Evas *e) |
Creates a new vector object on the given Evas e canvas. | |
Evas_Vg_Shape * | evas_vg_shape_add (Evas_Vg_Container *parent) |
Creates a new vector shape object. | |
Evas_Vg_Container * | evas_vg_container_add (Evas_Object *parent) |
Creates a new vector container object. | |
Eina_Bool | evas_vg_node_visible_get (Evas_Vg_Node *obj) |
Retrieves whether or not the given Evas_Vg_Node object is visible. | |
void | evas_vg_node_visible_set (Evas_Vg_Node *obj, Eina_Bool v) |
Makes the given Evas_Vg_Node object visible or invisible. | |
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. | |
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. | |
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. | |
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. | |
double | evas_vg_shape_stroke_width_get (Evas_Vg_Shape *obj) |
Gets the stroke width to be used for stroking the path. | |
void | evas_vg_shape_stroke_width_set (Evas_Vg_Shape *obj, double w) |
Sets the stroke width to be used for stroking the path. | |
Evas_Vg_Cap | evas_vg_shape_stroke_cap_get (Evas_Vg_Shape *obj) |
Gets the cap style used for stroking path. | |
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. | |
Evas_Vg_Join | evas_vg_shape_stroke_join_get (Evas_Vg_Shape *obj) |
Gets the join style used for stroking path. | |
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. | |
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. | |
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. | |
void | evas_vg_shape_dup (Evas_Vg_Shape *obj, Evas_Vg_Shape *dup_from) |
Copy the shape data from the object specified. | |
void | evas_vg_shape_reset (Evas_Vg_Shape *obj) |
Reset the shape data of the shape object. | |
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. | |
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. | |
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. | |
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). | |
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. | |
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). | |
void | evas_vg_shape_append_circle (Evas_Vg_Shape *obj, double x, double y, double radius) |
Append a circle with given center and radius. | |
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. | |
void | evas_vg_shape_fill_set (Evas_Vg_Shape *obj, Evas_Vg_Node *f) |
Set a vg object as the fill property. | |
Evas_Vg_Node * | evas_vg_shape_fill_get (const Evas_Vg_Shape *obj) |
Returns the object that is set for the fill property. | |
void | evas_vg_shape_stroke_fill_set (Evas_Vg_Shape *obj, Evas_Vg_Node *f) |
Set a vg object as the stroke fill property. | |
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. | |
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. | |
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. | |
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. | |
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. | |
Evas_Vg_Gradient_Linear * | evas_vg_gradient_linear_add (Evas_Vg_Container *parent) |
Creates a new linear gradient object. | |
void | evas_vg_gradient_linear_start_set (Evas_Vg_Gradient_Linear *obj, double x, double y) |
Sets the start point of this linear gradient. | |
void | evas_vg_gradient_linear_start_get (Evas_Vg_Gradient_Linear *obj, double *x, double *y) |
Gets the start point of this linear gradient. | |
void | evas_vg_gradient_linear_end_set (Evas_Vg_Gradient_Linear *obj, double x, double y) |
Sets the end point of this linear gradient. | |
void | evas_vg_gradient_linear_end_get (Evas_Vg_Gradient_Linear *obj, double *x, double *y) |
Gets the end point of this linear gradient. | |
Evas_Vg_Gradient_Radial * | evas_vg_gradient_radial_add (Evas_Vg_Container *parent) |
Creates a new radial gradient object. | |
void | evas_vg_gradient_radial_center_set (Evas_Vg_Gradient_Radial *obj, double x, double y) |
Sets the center of this radial gradient. | |
void | evas_vg_gradient_radial_center_get (Evas_Vg_Gradient_Radial *obj, double *x, double *y) |
Gets the center of this radial gradient. | |
void | evas_vg_gradient_radial_radius_set (Evas_Vg_Gradient_Radial *obj, double r) |
Sets the center radius of this radial gradient. | |
double | evas_vg_gradient_radial_radius_get (Evas_Vg_Gradient_Radial *obj) |
Gets the center radius of this radial gradient. | |
void | evas_vg_gradient_radial_focal_set (Evas_Vg_Gradient_Radial *obj, double x, double y) |
Sets the focal point of this radial gradient. | |
void | evas_vg_gradient_radial_focal_get (Evas_Vg_Gradient_Radial *obj, double *x, double *y) |
Gets the focal point of this radial gradient. | |
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. evas_vg_shape_stroke_cap_set. | |
typedef enum Evas_Vg_Join_Type | Evas_Vg_Join |
These values determine how two joining lines are rendered in a stroker. evas_vg_shape_stroke_join_set. | |
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. evas_vg_gradient_spread_set. | |
typedef enum Evas_Vg_Fill_Rule_Type | Evas_Vg_Fill_Rule |
Specifies how an image content get filled. evas_vg_shape_fill_rule_set. | |
typedef struct _Evas_Vg_Dash | Evas_Vg_Dash |
Type describing dash. evas_vg_shape_stroke_dash_set. |
Typedef Documentation
typedef enum Evas_Vg_Cap_Type Evas_Vg_Cap |
These values determine how the end of opened sub-paths are rendered in a stroke. evas_vg_shape_stroke_cap_set.
- Since (EFL) :
- 1.24
typedef struct _Evas_Vg_Dash Evas_Vg_Dash |
Type describing dash. evas_vg_shape_stroke_dash_set.
- Since (EFL) :
- 1.24
typedef enum Evas_Vg_Fill_Rule_Type Evas_Vg_Fill_Rule |
Specifies how an image content get filled. evas_vg_shape_fill_rule_set.
- Since (EFL) :
- 1.25.1
typedef enum Evas_Vg_Gradient_Spread_Type Evas_Vg_Gradient_Spread |
Specifies how the area outside the gradient area should be filled. evas_vg_gradient_spread_set.
- Since (EFL) :
- 1.24
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.
- Since (EFL) :
- 1.24
typedef enum Evas_Vg_Join_Type Evas_Vg_Join |
These values determine how two joining lines are rendered in a stroker. evas_vg_shape_stroke_join_set.
- Since (EFL) :
- 1.24
typedef enum Evas_Vg_Path_Command_Type Evas_Vg_Path_Command |
These values determine how the points are interpreted in a stream of points.
- Since (EFL) :
- 1.24
Enumeration Type Documentation
Enumeration that defines how viewbox will be filled int the vg canvs's viewport. default Fill_Mode is none
.
- Since (EFL) :
- 1.24
- Enumerator:
enum Evas_Vg_Cap_Type |
These values determine how the end of opened sub-paths are rendered in a stroke. evas_vg_shape_stroke_cap_set.
- Since (EFL) :
- 1.24
- Enumerator:
Specifies how an image content get filled. evas_vg_shape_fill_rule_set.
- Since (EFL) :
- 1.25.1
- Enumerator:
Specifies how the area outside the gradient area should be filled. evas_vg_gradient_spread_set.
- Since (EFL) :
- 1.24
- Enumerator:
enum Evas_Vg_Join_Type |
These values determine how two joining lines are rendered in a stroker. evas_vg_shape_stroke_join_set.
- Since (EFL) :
- 1.24
- Enumerator:
These values determine how the points are interpreted in a stream of points.
- Since (EFL) :
- 1.24
- Enumerator:
Function Documentation
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.
- Parameters:
-
[in] e The given canvas.
- Returns:
- The created vector object handle.
- See also:
- evas_obj_vg_root_node_get()
- Since (EFL) :
- 1.14
- Since :
- 3.0
Evas_Vg_Node* evas_object_vg_root_node_get | ( | const Evas_Object * | obj | ) |
Get the root node of the evas_object_vg.
- Parameters:
-
[in] obj The object.
- Returns:
- Root node of the VG canvas.
- Since (EFL) :
- 1.14
- Since :
- 3.0
void evas_object_vg_root_node_set | ( | Evas_Object * | obj, |
Evas_Vg_Node * | root | ||
) |
Set the root node of the evas_object_vg.
- Note:
- To manually create the shape object and show in the Vg object canvas you must create the hierarchy and set as root node.
It takes the ownership of the root node.
- Parameters:
-
[in] obj The object. [in] root Root node(Evas_Vg_Container) of the VG canvas.
- Since (EFL) :
- 1.24
- Since :
- 6.0
Evas_Vg_Container* evas_vg_container_add | ( | Evas_Object * | parent | ) |
Creates a new vector container object.
- Parameters:
-
[in] parent The given vector container object.
- Returns:
- The created vector container object handle.
- Since (EFL) :
- 1.14
- Since :
- 3.0
Evas_Vg_Gradient_Linear* evas_vg_gradient_linear_add | ( | Evas_Vg_Container * | parent | ) |
Creates a new linear gradient object.
- Parameters:
-
[in] parent The given vector container object.
- Returns:
- The created linear gradient object handle.
- Since (EFL) :
- 1.24
- Since :
- 6.0
void evas_vg_gradient_linear_end_get | ( | Evas_Vg_Gradient_Linear * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the end point of this linear gradient.
- Parameters:
-
[in] obj The object. [out] x The x co-ordinate of end point. [out] y The y co-ordinate of end point.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_gradient_linear_end_set | ( | Evas_Vg_Gradient_Linear * | obj, |
double | x, | ||
double | y | ||
) |
Sets the end point of this linear gradient.
- Parameters:
-
[in] obj The object. [in] x The x co-ordinate of end point. [in] y The y co-ordinate of end point.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_gradient_linear_start_get | ( | Evas_Vg_Gradient_Linear * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the start point of this linear gradient.
- Parameters:
-
[in] obj The object. [out] x The x co-ordinate of start point. [out] y The y co-ordinate of start point.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_gradient_linear_start_set | ( | Evas_Vg_Gradient_Linear * | obj, |
double | x, | ||
double | y | ||
) |
Sets the start point of this linear gradient.
- Parameters:
-
[in] obj The object. [in] x The x co-ordinate of start point. [in] y The y co-ordinate of start point
- Since (EFL) :
- 1.24
- Since :
- 3.0
Evas_Vg_Gradient_Radial* evas_vg_gradient_radial_add | ( | Evas_Vg_Container * | parent | ) |
Creates a new radial gradient object.
- Parameters:
-
[in] parent The given vector container object.
- Returns:
- The created radial gradient object handle.
- Since (EFL) :
- 1.24
- Since :
- 6.0
void evas_vg_gradient_radial_center_get | ( | Evas_Vg_Gradient_Radial * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the center of this radial gradient.
- Parameters:
-
[in] obj The object. [out] x The x co-ordinate of center point. [out] y The y co-ordinate of center point.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_gradient_radial_center_set | ( | Evas_Vg_Gradient_Radial * | obj, |
double | x, | ||
double | y | ||
) |
Sets the center of this radial gradient.
- Parameters:
-
[in] obj The object. [in] x The x co-ordinate of center point. [in] y The y co-ordinate of center point.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_gradient_radial_focal_get | ( | Evas_Vg_Gradient_Radial * | obj, |
double * | x, | ||
double * | y | ||
) |
Gets the focal point of this radial gradient.
- Parameters:
-
[in] obj The object. [out] x The x co-ordinate of focal point. [out] y The y co-ordinate of focal point.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_gradient_radial_focal_set | ( | Evas_Vg_Gradient_Radial * | obj, |
double | x, | ||
double | y | ||
) |
Sets the focal point of this radial gradient.
- Parameters:
-
[in] obj The object. [in] x The x co-ordinate of focal point. [in] y The y co-ordinate of focal point.
- Since (EFL) :
- 1.24
- Since :
- 3.0
double evas_vg_gradient_radial_radius_get | ( | Evas_Vg_Gradient_Radial * | obj | ) |
Gets the center radius of this radial gradient.
- Parameters:
-
[in] obj The object.
- Returns:
- The center radius of the given object.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_gradient_radial_radius_set | ( | Evas_Vg_Gradient_Radial * | obj, |
double | r | ||
) |
Sets the center radius of this radial gradient.
- Parameters:
-
[in] obj The object. [in] r The center radius.
- Since (EFL) :
- 1.24
- Since :
- 3.0
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.
- Parameters:
-
[in] obj The object.
- Returns:
- The spread type of the given object.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Parameters:
-
[in] obj The object. [in] s The spread type to be used.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Parameters:
-
[in] obj The object. [out] colors The color stops list. [out] length The length of the list.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Parameters:
-
[in] obj The object. [in] colors The color stops list. [in] length The length of the list.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Note:
- Use
NULL
pointers on the components you're not interested in: they'll be ignored by the function.
- Parameters:
-
[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.
- Since (EFL) :
- 1.24
- Since :
- 3.0
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.
- See also:
- evas_vg_node_color_get() (for an example)
- Note:
- These color values are expected to be premultiplied by
a
.
- Parameters:
-
[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.
- Since (EFL) :
- 1.24
- Since :
- 3.0
Eina_Bool evas_vg_node_visible_get | ( | Evas_Vg_Node * | obj | ) |
Retrieves whether or not the given Evas_Vg_Node object is visible.
- Parameters:
-
[in] obj The object.
- Returns:
EINA_TRUE
if the object is visible,EINA_FALSE
otherwise.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_node_visible_set | ( | Evas_Vg_Node * | obj, |
Eina_Bool | v | ||
) |
Makes the given Evas_Vg_Node object visible or invisible.
- Parameters:
-
[in] obj The object. [in] v EINA_TRUE
if to make the object visible,EINA_FALSE
otherwise.
- Since (EFL) :
- 1.24
- Since :
- 3.0
Evas_Vg_Shape* evas_vg_shape_add | ( | Evas_Vg_Container * | parent | ) |
Creates a new vector shape object.
- Parameters:
-
[in] parent The given vector container object.
- Returns:
- The created vector shape object handle.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Parameters:
-
[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.
- Since (EFL) :
- 1.18
- Since :
- 6.0
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).
- Note:
- Use this api if you know the end point's of the arc otherwise use more convenient function evas_vg_shape_append_arc_to()
- See also:
- evas_vg_shape_append_arc_to()
- Parameters:
-
[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.
- Since (EFL) :
- 1.14
- Since :
- 6.0
void evas_vg_shape_append_circle | ( | Evas_Vg_Shape * | obj, |
double | x, | ||
double | y, | ||
double | radius | ||
) |
Append a circle with given center and radius.
- See also:
- evas_vg_shape_append_arc()
- Parameters:
-
[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.
- Since (EFL) :
- 1.14
- Since :
- 6.0
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).
- Note:
- If the subpath does not contain any points, this function does nothing.
- Parameters:
-
[in] obj The object.
- Since (EFL) :
- 1.14
- Since :
- 6.0
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.
- Parameters:
-
[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.
- Since (EFL) :
- 1.14
- Since :
- 6.0
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.
- Note:
- if no current position present, it draws a line to itself, basically a point.
- See also:
- evas_vg_shape_append_move_to()
- Parameters:
-
[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.
- Since (EFL) :
- 1.14
- Since :
- 6.0
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.
- See also:
- evas_vg_shape_append_close()
- Parameters:
-
[in] obj The object. [in] x The x co-ordinate of the current point. [in] y The y co-ordinate of the current point.
- Since (EFL) :
- 1.14
- Since :
- 6.0
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.
- Note:
- xr and yr are specified in terms of width and height respectively.
- if xr and yr are 0, then it will draw a rectangle without rounded corner.
- Parameters:
-
[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].
- Since (EFL) :
- 1.14
- Since :
- 6.0
void evas_vg_shape_dup | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Shape * | dup_from | ||
) |
Copy the shape data from the object specified.
- Parameters:
-
[in] obj The object. [in] dup_from The Shape object from where data will be copied.
- Since (EFL) :
- 1.14
- Since :
- 6.0
Evas_Vg_Node* evas_vg_shape_fill_get | ( | const Evas_Vg_Shape * | obj | ) |
Returns the object that is set for the fill property.
- Parameters:
-
[in] obj The object whose fill property is inspected.
- Returns:
- The object that is set as fill property.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_shape_fill_set | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Node * | f | ||
) |
Set a vg object as the fill property.
- Parameters:
-
[in] obj The object whose fill property gets modified. [in] f The object content to be used for filling.
- Since (EFL) :
- 1.24
- Since :
- 3.0
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.
- Parameters:
-
[in] obj The object. [out] op The command list. [out] points The point list.
- Since (EFL) :
- 1.14
- Since :
- 6.0
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.
- See also:
- Evas_Vg_Path_Command
- Parameters:
-
[in] obj The object. [in] op The command list. [in] points The point list.
- Since (EFL) :
- 1.14
- Since :
- 6.0
void evas_vg_shape_reset | ( | Evas_Vg_Shape * | obj | ) |
Reset the shape data of the shape object.
- Parameters:
-
[in] obj The object.
- Since (EFL) :
- 1.14
- Since :
- 6.0
Evas_Vg_Cap evas_vg_shape_stroke_cap_get | ( | Evas_Vg_Shape * | obj | ) |
Gets the cap style used for stroking path.
- Parameters:
-
[in] obj The object.
- Returns:
- The cap style of the given object.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- See also:
- Evas_Vg_Cap
- Parameters:
-
[in] obj The object. [in] c The cap style to use , default is EVAS_VG_CAP_BUTT
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Parameters:
-
[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.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Parameters:
-
[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.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- Parameters:
-
[in] obj The object whose stroke fill property is inspected.
- Returns:
- The object that is set as stroke fill property.
- Since (EFL) :
- 1.24
- Since :
- 3.0
void evas_vg_shape_stroke_fill_set | ( | Evas_Vg_Shape * | obj, |
Evas_Vg_Node * | f | ||
) |
Set a vg object as the stroke fill property.
- Parameters:
-
[in] obj The object whose stroke fill property gets modified. [in] f The object content will be used for stroke filling.
- Since (EFL) :
- 1.24
- Since :
- 3.0
Evas_Vg_Join evas_vg_shape_stroke_join_get | ( | Evas_Vg_Shape * | obj | ) |
Gets the join style used for stroking path.
- Parameters:
-
[in] obj The object.
- Returns:
- The join style of the given object.
- Since (EFL) :
- 1.14
- Since :
- 3.0
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.
- See also:
- Evas_Vg_Join
- Parameters:
-
[in] obj The object. [in] j The join style to use, default is EVAS_VG_JOIN_MITER.
- Since (EFL) :
- 1.14
- Since :
- 3.0
double evas_vg_shape_stroke_width_get | ( | Evas_Vg_Shape * | obj | ) |
Gets the stroke width to be used for stroking the path.
- Parameters:
-
[in] obj The object.
- Returns:
- The stroke width of the given object.
- Since (EFL) :
- 1.14
- Since :
- 3.0
void evas_vg_shape_stroke_width_set | ( | Evas_Vg_Shape * | obj, |
double | w | ||
) |
Sets the stroke width to be used for stroking the path.
- Parameters:
-
[in] obj The object. [in] w The stroke width to be used.
- Since (EFL) :
- 1.14
- Since :
- 3.0