forked from enlightenment/efl
efl interface: introduce efl_gfx_path mixin.
As we discussed, redesigned efl_gfx_shape mixin. Split path properties/methods from the shape so that other classes benefit from the path.
This commit is contained in:
parent
4da634c26f
commit
e0da83ce56
|
@ -20,6 +20,7 @@ efl_eolian_files = \
|
|||
lib/efl/interfaces/efl_gfx_stack.eo \
|
||||
lib/efl/interfaces/efl_gfx_view.eo \
|
||||
lib/efl/interfaces/efl_gfx_buffer.eo \
|
||||
lib/efl/interfaces/efl_gfx_path.eo \
|
||||
lib/efl/interfaces/efl_gfx_shape.eo \
|
||||
lib/efl/interfaces/efl_gfx_gradient.eo \
|
||||
lib/efl/interfaces/efl_gfx_gradient_linear.eo \
|
||||
|
@ -88,6 +89,7 @@ lib_LTLIBRARIES += lib/efl/libefl.la
|
|||
lib_efl_libefl_la_SOURCES = \
|
||||
lib/efl/interfaces/efl_interfaces_main.c \
|
||||
lib/efl/interfaces/efl_model_common.c \
|
||||
lib/efl/interfaces/efl_gfx_path.c \
|
||||
lib/efl/interfaces/efl_gfx_shape.c \
|
||||
lib/efl/interfaces/efl_vpath_file.c \
|
||||
lib/efl/interfaces/efl_vpath_manager.c \
|
||||
|
|
|
@ -108,7 +108,7 @@ _ector_renderer_cairo_shape_ector_renderer_prepare(Eo *obj, Ector_Renderer_Cairo
|
|||
pd->parent = efl_data_xref(base->surface, ECTOR_CAIRO_SURFACE_CLASS, obj);
|
||||
}
|
||||
|
||||
efl_gfx_shape_path_get(obj, &cmds, &pts);
|
||||
efl_gfx_path_get(obj, &cmds, &pts);
|
||||
if (!pd->path && cmds)
|
||||
{
|
||||
cairo_new_path(pd->parent->cairo);
|
||||
|
@ -232,13 +232,13 @@ _ector_renderer_cairo_shape_ector_renderer_cairo_fill(Eo *obj EINA_UNUSED,
|
|||
|
||||
static void
|
||||
_ector_renderer_cairo_shape_ector_renderer_bounds_get(Eo *obj,
|
||||
Ector_Renderer_Cairo_Shape_Data *pd EINA_UNUSED,
|
||||
Eina_Rectangle *r)
|
||||
Ector_Renderer_Cairo_Shape_Data *pd EINA_UNUSED,
|
||||
Eina_Rectangle *r)
|
||||
{
|
||||
Ector_Renderer_Cairo_Data *bd;
|
||||
|
||||
// FIXME: It should be possible to actually ask cairo about that
|
||||
efl_gfx_shape_bounds_get(obj, r);
|
||||
efl_gfx_path_bounds_get(obj, r);
|
||||
|
||||
bd = efl_data_scope_get(obj, ECTOR_RENDERER_CAIRO_CLASS);
|
||||
r->x += bd->generic->origin.x;
|
||||
|
@ -297,7 +297,7 @@ _ector_renderer_cairo_shape_efl_object_destructor(Eo *obj, Ector_Renderer_Cairo_
|
|||
|
||||
//FIXME, As base class destructor can't call destructor of mixin class.
|
||||
// call explicit API to free shape data.
|
||||
efl_gfx_shape_reset(obj);
|
||||
efl_gfx_path_reset(obj);
|
||||
|
||||
base = efl_data_scope_get(obj, ECTOR_RENDERER_CLASS);
|
||||
efl_data_xunref(base->surface, pd->parent, obj);
|
||||
|
|
|
@ -107,7 +107,7 @@ _ector_renderer_gl_shape_ector_renderer_gl_fill(Eo *obj EINA_UNUSED,
|
|||
static void
|
||||
_ector_renderer_gl_shape_ector_renderer_bounds_get(Eo *obj, Ector_Renderer_GL_Shape_Data *pd, Eina_Rectangle *r)
|
||||
{
|
||||
efl_gfx_shape_bounds_get(obj, r);
|
||||
efl_gfx_path_bounds_get(obj, r);
|
||||
|
||||
r->x += pd->base->origin.x;
|
||||
r->y += pd->base->origin.y;
|
||||
|
|
|
@ -520,7 +520,7 @@ _update_rle(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
|
|||
Efl_Gfx_Fill_Rule fill_rule;
|
||||
Outline *outline, *dash_outline;
|
||||
|
||||
efl_gfx_shape_path_get(obj, &cmds, &pts);
|
||||
efl_gfx_path_get(obj, &cmds, &pts);
|
||||
fill_rule = efl_gfx_shape_fill_rule_get(obj);
|
||||
if (cmds && (_generate_stroke_data(pd) || _generate_shape_data(pd)))
|
||||
{
|
||||
|
@ -666,17 +666,17 @@ _ector_renderer_software_shape_ector_renderer_software_fill(Eo *obj EINA_UNUSED,
|
|||
}
|
||||
|
||||
static void
|
||||
_ector_renderer_software_shape_efl_gfx_shape_path_set(Eo *obj,
|
||||
Ector_Renderer_Software_Shape_Data *pd,
|
||||
const Efl_Gfx_Path_Command *op,
|
||||
const double *points)
|
||||
_ector_renderer_software_shape_efl_gfx_path_path_set(Eo *obj,
|
||||
Ector_Renderer_Software_Shape_Data *pd,
|
||||
const Efl_Gfx_Path_Command *op,
|
||||
const double *points)
|
||||
{
|
||||
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
pd->shape_data = NULL;
|
||||
pd->outline_data = NULL;
|
||||
|
||||
efl_gfx_shape_path_set(efl_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS), op, points);
|
||||
efl_gfx_path_set(efl_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS), op, points);
|
||||
}
|
||||
|
||||
|
||||
|
@ -711,7 +711,7 @@ _ector_renderer_software_shape_efl_object_destructor(Eo *obj, Ector_Renderer_Sof
|
|||
{
|
||||
//FIXME, As base class destructor can't call destructor of mixin class.
|
||||
// call explicit API to free shape data.
|
||||
efl_gfx_shape_reset(obj);
|
||||
efl_gfx_path_reset(obj);
|
||||
|
||||
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||
|
|
|
@ -7,8 +7,8 @@ class Ector.Renderer.Software.Shape (Ector.Renderer.Software, Ector.Renderer.Sha
|
|||
Ector.Renderer.draw;
|
||||
Ector.Renderer.Software.fill;
|
||||
Ector.Renderer.crc.get;
|
||||
Efl.Gfx.Shape.path.set;
|
||||
Efl.Gfx.Path.path.set;
|
||||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
Efl.Object.destructor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,6 +108,7 @@ EAPI extern const Efl_Event_Description _EFL_GFX_PATH_CHANGED;
|
|||
#include "interfaces/efl_gfx_stack.eo.h"
|
||||
#include "interfaces/efl_gfx_fill.eo.h"
|
||||
#include "interfaces/efl_gfx_view.eo.h"
|
||||
#include "interfaces/efl_gfx_path.eo.h"
|
||||
#include "interfaces/efl_gfx_shape.eo.h"
|
||||
#include "interfaces/efl_gfx_gradient.eo.h"
|
||||
#include "interfaces/efl_gfx_gradient_linear.eo.h"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,275 @@
|
|||
import eina_types;
|
||||
import efl_gfx_types;
|
||||
|
||||
mixin Efl.Gfx.Path
|
||||
{
|
||||
[[EFL graphics path object interface]]
|
||||
methods {
|
||||
@property path {
|
||||
[[Set the list of commands and points to be used to create the
|
||||
content of shape.
|
||||
|
||||
See \@ref efl_gfx_path interface for how to create a command list.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
op: ptr(const(Efl.Gfx.Path.Command_Type)); [[Command list]]
|
||||
points: ptr(const(double)); [[Point list]]
|
||||
}
|
||||
}
|
||||
@property length {
|
||||
[[Path length property]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
commands: uint; [[Commands]]
|
||||
points: uint; [[Points]]
|
||||
}
|
||||
}
|
||||
@property current {
|
||||
[[Current point coordinates]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
x: double; [[X co-ordinate of the current point.]]
|
||||
y: double; [[Y co-ordinate of the current point.]]
|
||||
}
|
||||
}
|
||||
@property current_ctrl {
|
||||
[[Current control point coordinates]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
x: double; [[X co-ordinate of control point.]]
|
||||
y: double; [[Y co-ordinate of control point.]]
|
||||
}
|
||||
}
|
||||
dup {
|
||||
[[Copy the shape data from the object specified.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in dup_from: const(Efl.Object); [[Shape object from where data will be copied.]]
|
||||
}
|
||||
}
|
||||
bounds_get {
|
||||
[[Compute and return the bounding box of the currently set path
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@out r: Eina.Rectangle; [[Contain the bounding box of the currently set path]]
|
||||
}
|
||||
}
|
||||
reset {
|
||||
[[Reset the shape data of the shape object.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
}
|
||||
append_move_to {
|
||||
[[Moves the current point to the given point,
|
||||
implicitly starting a new subpath and closing the previous one.
|
||||
|
||||
See also @.append_close.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the current point.]]
|
||||
@in y: double; [[Y co-ordinate of the current point.]]
|
||||
}
|
||||
}
|
||||
append_line_to {
|
||||
[[Adds a straight line from the current position to the given end point.
|
||||
After the line is drawn, the current position is updated to be at the
|
||||
end point of the line.
|
||||
|
||||
If no current position present, it draws a line to itself, basically
|
||||
a point.
|
||||
|
||||
See also @.append_move_to.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
}
|
||||
}
|
||||
append_quadratic_to {
|
||||
[[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.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
@in ctrl_x: double; [[X co-ordinate of control point.]]
|
||||
@in ctrl_y: double; [[Y co-ordinate of control point.]]
|
||||
}
|
||||
}
|
||||
append_squadratic_to {
|
||||
[[Same as efl_gfx_path_append_quadratic_to() api only difference is
|
||||
that it uses the current control point to draw the bezier.
|
||||
|
||||
See also @.append_quadratic_to.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
}
|
||||
}
|
||||
append_cubic_to {
|
||||
[[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.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in ctrl_x0: double; [[X co-ordinate of 1st control point.]]
|
||||
@in ctrl_y0: double; [[Y co-ordinate of 1st control point.]]
|
||||
@in ctrl_x1: double; [[X co-ordinate of 2nd control point.]]
|
||||
@in ctrl_y1: double; [[Y co-ordinate of 2nd control point.]]
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
}
|
||||
}
|
||||
append_scubic_to {
|
||||
[[Same as efl_gfx_path_append_cubic_to() api only difference is that it
|
||||
uses the current control point to draw the bezier.
|
||||
|
||||
See also @.append_cubic_to.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
@in ctrl_x: double; [[X co-ordinate of 2nd control point.]]
|
||||
@in ctrl_y: double; [[Y co-ordinate of 2nd control point.]]
|
||||
}
|
||||
}
|
||||
append_arc_to {
|
||||
[[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).
|
||||
|
||||
Use this api if you know the end point's of the arc otherwise use
|
||||
more convenient function @.append_arc.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the arc.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the arc.]]
|
||||
@in rx: double; [[Radius of arc in x direction.]]
|
||||
@in ry: double; [[Radius of arc in y direction.]]
|
||||
@in angle: double; [[X-axis rotation , normally 0.]]
|
||||
@in large_arc: bool; [[Defines whether to draw the larger arc or
|
||||
smaller arc joining two point.]]
|
||||
@in sweep: bool; [[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.]]
|
||||
}
|
||||
}
|
||||
append_arc {
|
||||
[[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.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the rect.]]
|
||||
@in y: double; [[Y co-ordinate of the rect.]]
|
||||
@in w: double; [[Width of the rect.]]
|
||||
@in h: double; [[Height of the rect.]]
|
||||
@in start_angle: double; [[Angle at which the arc will start]]
|
||||
@in sweep_length: double; [[@ Length of the arc.]]
|
||||
}
|
||||
}
|
||||
append_close {
|
||||
[[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).
|
||||
|
||||
If the subpath does not contain any points, this function does nothing.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
}
|
||||
append_circle {
|
||||
[[Append a circle with given center and radius.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the center of the circle.]]
|
||||
@in y: double; [[Y co-ordinate of the center of the circle.]]
|
||||
@in radius: double; [[Radius of the circle.]]
|
||||
}
|
||||
}
|
||||
append_rect {
|
||||
[[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.
|
||||
|
||||
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.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the rectangle.]]
|
||||
@in y: double; [[Y co-ordinate of the rectangle.]]
|
||||
@in w: double; [[Width of the rectangle.]]
|
||||
@in h: double; [[Height of the rectangle.]]
|
||||
@in rx: double; [[The x radius of the rounded corner and should be
|
||||
in range [ 0 to w/2 ]
|
||||
]]
|
||||
@in ry: double; [[The y radius of the rounded corner and should be
|
||||
in range [ 0 to h/2 ]
|
||||
]]
|
||||
}
|
||||
}
|
||||
append_svg_path {
|
||||
[[Append SVG path data]]
|
||||
params {
|
||||
@in svg_path_data: string; [[SVG path data to append]]
|
||||
}
|
||||
}
|
||||
interpolate {
|
||||
[[Interpolate object]]
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
params {
|
||||
@in from: const(Efl.Object); [[Source object]]
|
||||
@in to: const(Efl.Object); [[Destination object]]
|
||||
@in pos_map: double; [[Position map]]
|
||||
}
|
||||
}
|
||||
equal_commands {
|
||||
[[Equal commands in object]]
|
||||
return: bool; [[True on success, $false otherwise]]
|
||||
params {
|
||||
@in with: const(Efl.Object); [[Object]]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,6 @@
|
|||
import eina_types;
|
||||
import efl_gfx_types;
|
||||
|
||||
mixin Efl.Gfx.Shape
|
||||
mixin Efl.Gfx.Shape (Efl.Gfx.Path)
|
||||
{
|
||||
[[EFL graphics shape object interface]]
|
||||
methods {
|
||||
|
@ -118,48 +117,13 @@ mixin Efl.Gfx.Shape
|
|||
One of $EFL_GFX_FILL_RULE_WINDING, $EFL_GFX_FILL_RULE_ODD_EVEN]]
|
||||
}
|
||||
}
|
||||
@property path {
|
||||
[[Set the list of commands and points to be used to create the
|
||||
content of shape.
|
||||
|
||||
See \@ref efl_gfx_path interface for how to create a command list.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
op: ptr(const(Efl.Gfx.Path.Command_Type)); [[Command list]]
|
||||
points: ptr(const(double)); [[Point list]]
|
||||
}
|
||||
}
|
||||
@property path_length {
|
||||
[[Path length property]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
commands: uint; [[Commands]]
|
||||
points: uint; [[Points]]
|
||||
}
|
||||
}
|
||||
@property current {
|
||||
[[Current point coordinates]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
x: double; [[X co-ordinate of the current point.]]
|
||||
y: double; [[Y co-ordinate of the current point.]]
|
||||
}
|
||||
}
|
||||
@property current_ctrl {
|
||||
[[Current control point coordinates]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
x: double; [[X co-ordinate of control point.]]
|
||||
y: double; [[Y co-ordinate of control point.]]
|
||||
interpolate {
|
||||
[[Interpolate object]]
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
params {
|
||||
@in from: const(Efl.Object); [[Source object]]
|
||||
@in to: const(Efl.Object); [[Destination object]]
|
||||
@in pos_map: double; [[Position map]]
|
||||
}
|
||||
}
|
||||
dup {
|
||||
|
@ -171,218 +135,5 @@ mixin Efl.Gfx.Shape
|
|||
@in dup_from: const(Efl.Object); [[Shape object from where data will be copied.]]
|
||||
}
|
||||
}
|
||||
bounds_get {
|
||||
[[Compute and return the bounding box of the currently set path
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@out r: Eina.Rectangle; [[Contain the bounding box of the currently set path]]
|
||||
}
|
||||
}
|
||||
reset {
|
||||
[[Reset the shape data of the shape object.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
}
|
||||
append_move_to {
|
||||
[[Moves the current point to the given point,
|
||||
implicitly starting a new subpath and closing the previous one.
|
||||
|
||||
See also @.append_close.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the current point.]]
|
||||
@in y: double; [[Y co-ordinate of the current point.]]
|
||||
}
|
||||
}
|
||||
append_line_to {
|
||||
[[Adds a straight line from the current position to the given end point.
|
||||
After the line is drawn, the current position is updated to be at the
|
||||
end point of the line.
|
||||
|
||||
If no current position present, it draws a line to itself, basically
|
||||
a point.
|
||||
|
||||
See also @.append_move_to.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
}
|
||||
}
|
||||
append_quadratic_to {
|
||||
[[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.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
@in ctrl_x: double; [[X co-ordinate of control point.]]
|
||||
@in ctrl_y: double; [[Y co-ordinate of control point.]]
|
||||
}
|
||||
}
|
||||
append_squadratic_to {
|
||||
[[Same as efl_gfx_path_append_quadratic_to() api only difference is
|
||||
that it uses the current control point to draw the bezier.
|
||||
|
||||
See also @.append_quadratic_to.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
}
|
||||
}
|
||||
append_cubic_to {
|
||||
[[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.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in ctrl_x0: double; [[X co-ordinate of 1st control point.]]
|
||||
@in ctrl_y0: double; [[Y co-ordinate of 1st control point.]]
|
||||
@in ctrl_x1: double; [[X co-ordinate of 2nd control point.]]
|
||||
@in ctrl_y1: double; [[Y co-ordinate of 2nd control point.]]
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
}
|
||||
}
|
||||
append_scubic_to {
|
||||
[[Same as efl_gfx_path_append_cubic_to() api only difference is that it
|
||||
uses the current control point to draw the bezier.
|
||||
|
||||
See also @.append_cubic_to.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the line.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the line.]]
|
||||
@in ctrl_x: double; [[X co-ordinate of 2nd control point.]]
|
||||
@in ctrl_y: double; [[Y co-ordinate of 2nd control point.]]
|
||||
}
|
||||
}
|
||||
append_arc_to {
|
||||
[[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).
|
||||
|
||||
Use this api if you know the end point's of the arc otherwise use
|
||||
more convenient function @.append_arc.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of end point of the arc.]]
|
||||
@in y: double; [[Y co-ordinate of end point of the arc.]]
|
||||
@in rx: double; [[Radius of arc in x direction.]]
|
||||
@in ry: double; [[Radius of arc in y direction.]]
|
||||
@in angle: double; [[X-axis rotation , normally 0.]]
|
||||
@in large_arc: bool; [[Defines whether to draw the larger arc or
|
||||
smaller arc joining two point.]]
|
||||
@in sweep: bool; [[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.]]
|
||||
}
|
||||
}
|
||||
append_arc {
|
||||
[[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.
|
||||
|
||||
@since 1.18
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the rect.]]
|
||||
@in y: double; [[Y co-ordinate of the rect.]]
|
||||
@in w: double; [[Width of the rect.]]
|
||||
@in h: double; [[Height of the rect.]]
|
||||
@in start_angle: double; [[Angle at which the arc will start]]
|
||||
@in sweep_length: double; [[@ Length of the arc.]]
|
||||
}
|
||||
}
|
||||
append_close {
|
||||
[[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).
|
||||
|
||||
If the subpath does not contain any points, this function does nothing.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
}
|
||||
append_circle {
|
||||
[[Append a circle with given center and radius.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the center of the circle.]]
|
||||
@in y: double; [[Y co-ordinate of the center of the circle.]]
|
||||
@in radius: double; [[Radius of the circle.]]
|
||||
}
|
||||
}
|
||||
append_rect {
|
||||
[[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.
|
||||
|
||||
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.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in x: double; [[X co-ordinate of the rectangle.]]
|
||||
@in y: double; [[Y co-ordinate of the rectangle.]]
|
||||
@in w: double; [[Width of the rectangle.]]
|
||||
@in h: double; [[Height of the rectangle.]]
|
||||
@in rx: double; [[The x radius of the rounded corner and should be
|
||||
in range [ 0 to w/2 ]
|
||||
]]
|
||||
@in ry: double; [[The y radius of the rounded corner and should be
|
||||
in range [ 0 to h/2 ]
|
||||
]]
|
||||
}
|
||||
}
|
||||
append_svg_path {
|
||||
[[Append SVG path data]]
|
||||
params {
|
||||
@in svg_path_data: string; [[SVG path data to append]]
|
||||
}
|
||||
}
|
||||
interpolate {
|
||||
[[Interpolate object]]
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
params {
|
||||
@in from: const(Efl.Object); [[Source object]]
|
||||
@in to: const(Efl.Object); [[Destination object]]
|
||||
@in pos_map: double; [[Position map]]
|
||||
}
|
||||
}
|
||||
equal_commands {
|
||||
[[Equal commands in object]]
|
||||
return: bool; [[True on success, $false otherwise]]
|
||||
params {
|
||||
@in with: const(Efl.Object); [[Object]]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ _efl_vg_shape_efl_vg_bounds_get(Eo *obj,
|
|||
Eina_Rectangle *r)
|
||||
{
|
||||
// FIXME: Use the renderer bounding box when it has been created instead of an estimation
|
||||
efl_gfx_shape_bounds_get(obj, r);
|
||||
efl_gfx_path_bounds_get(obj, r);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -330,31 +330,31 @@ evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j)
|
|||
EAPI void
|
||||
evas_vg_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points)
|
||||
{
|
||||
efl_gfx_shape_path_set(obj, op, points);
|
||||
efl_gfx_path_set(obj, op, points);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_path_get(Eo *obj, const Efl_Gfx_Path_Command **op, const double **points)
|
||||
{
|
||||
efl_gfx_shape_path_get(obj, op, points);
|
||||
efl_gfx_path_get(obj, op, points);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_path_length_get(Eo *obj, unsigned int *commands, unsigned int *points)
|
||||
{
|
||||
efl_gfx_shape_path_length_get(obj, commands, points);
|
||||
efl_gfx_path_length_get(obj, commands, points);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_current_get(Eo *obj, double *x, double *y)
|
||||
{
|
||||
efl_gfx_shape_current_get(obj, x, y);
|
||||
efl_gfx_path_current_get(obj, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_current_ctrl_get(Eo *obj, double *x, double *y)
|
||||
{
|
||||
efl_gfx_shape_current_ctrl_get(obj, x, y);
|
||||
efl_gfx_path_current_ctrl_get(obj, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -366,79 +366,79 @@ evas_vg_shape_dup(Eo *obj, Eo *dup_from)
|
|||
EAPI void
|
||||
evas_vg_shape_reset(Eo *obj)
|
||||
{
|
||||
efl_gfx_shape_reset(obj);
|
||||
efl_gfx_path_reset(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_move_to(Eo *obj, double x, double y)
|
||||
{
|
||||
efl_gfx_shape_append_move_to(obj, x, y);
|
||||
efl_gfx_path_append_move_to(obj, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_line_to(Eo *obj, double x, double y)
|
||||
{
|
||||
efl_gfx_shape_append_line_to(obj, x, y);
|
||||
efl_gfx_path_append_line_to(obj, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
|
||||
{
|
||||
efl_gfx_shape_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y);
|
||||
efl_gfx_path_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_squadratic_to(Eo *obj, double x, double y)
|
||||
{
|
||||
efl_gfx_shape_append_squadratic_to(obj, x, y);
|
||||
efl_gfx_path_append_squadratic_to(obj, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_cubic_to(Eo *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1)
|
||||
{
|
||||
efl_gfx_shape_append_cubic_to(obj, x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1);
|
||||
efl_gfx_path_append_cubic_to(obj, x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
|
||||
{
|
||||
efl_gfx_shape_append_scubic_to(obj, x, y, ctrl_x, ctrl_y);
|
||||
efl_gfx_path_append_scubic_to(obj, x, y, ctrl_x, ctrl_y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_arc_to(Eo *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep)
|
||||
{
|
||||
efl_gfx_shape_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep);
|
||||
efl_gfx_path_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_arc(Eo *obj, double x, double y, double w, double h, double start_angle, double sweep_length)
|
||||
{
|
||||
efl_gfx_shape_append_arc(obj, x, y, w, h, start_angle, sweep_length);
|
||||
efl_gfx_path_append_arc(obj, x, y, w, h, start_angle, sweep_length);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_close(Eo *obj)
|
||||
{
|
||||
efl_gfx_shape_append_close(obj);
|
||||
efl_gfx_path_append_close(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_circle(Eo *obj, double x, double y, double radius)
|
||||
{
|
||||
efl_gfx_shape_append_circle(obj, x, y, radius);
|
||||
efl_gfx_path_append_circle(obj, x, y, radius);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry)
|
||||
{
|
||||
efl_gfx_shape_append_rect(obj, x, y, w, h, rx, ry);
|
||||
efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_vg_shape_append_svg_path(Eo *obj, const char *svg_path_data)
|
||||
{
|
||||
efl_gfx_shape_append_svg_path(obj, svg_path_data);
|
||||
efl_gfx_path_append_svg_path(obj, svg_path_data);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
|
@ -450,7 +450,7 @@ evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map)
|
|||
EAPI Eina_Bool
|
||||
evas_vg_shape_equal_commands(Eo *obj, const Eo *with)
|
||||
{
|
||||
return efl_gfx_shape_equal_commands(obj, with);
|
||||
return efl_gfx_path_equal_commands(obj, with);
|
||||
}
|
||||
|
||||
EAPI Efl_VG*
|
||||
|
|
Loading…
Reference in New Issue