forked from enlightenment/efl
efl: make path a property actually.
This commit is contained in:
parent
091fd5f31d
commit
ba47b47eb2
|
@ -180,20 +180,16 @@ _ector_renderer_cairo_shape_ector_renderer_cairo_base_fill(Eo *obj, Ector_Render
|
|||
// I need to read SVG specification and see how to map that with cairo.
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_ector_renderer_cairo_shape_efl_graphics_shape_path_set(Eo *obj, Ector_Renderer_Cairo_Shape_Data *pd,
|
||||
const Efl_Graphics_Path_Command *op, const double *points)
|
||||
static void
|
||||
_ector_renderer_cairo_shape_efl_gfx_shape_path_set(Eo *obj, Ector_Renderer_Cairo_Shape_Data *pd,
|
||||
const Efl_Gfx_Path_Command *op, const double *points)
|
||||
{
|
||||
Eina_Bool r;
|
||||
|
||||
USE(obj, cairo_path_destroy, EINA_FALSE);
|
||||
USE(obj, cairo_path_destroy, );
|
||||
|
||||
if (pd->path) cairo_path_destroy(pd->path);
|
||||
pd->path = NULL;
|
||||
|
||||
eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, r = efl_graphics_shape_path_set(op, points));
|
||||
|
||||
return r;
|
||||
eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, efl_graphics_shape_path_set(op, points));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ class Ector.Renderer.Cairo.Shape (Ector.Renderer.Cairo.Base, Ector.Renderer.Gene
|
|||
Ector.Renderer.Generic.Base.prepare;
|
||||
Ector.Renderer.Generic.Base.draw;
|
||||
Ector.Renderer.Cairo.Base.fill;
|
||||
Efl.Graphics.Shape.path_set;
|
||||
Efl.Graphics.Shape.path.set;
|
||||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class Ector.Renderer.Generic.Shape (Ector.Renderer.Generic.Base, Efl.Graphics.Sh
|
|||
Efl.Graphics.Shape.stroke_dash;
|
||||
Efl.Graphics.Shape.stroke_cap;
|
||||
Efl.Graphics.Shape.stroke_join;
|
||||
Efl.Graphics.Shape.path_set;
|
||||
Efl.Graphics.Shape.path;
|
||||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ _ector_renderer_generic_shape_efl_graphics_shape_stroke_join_get(Eo *obj EINA_UN
|
|||
return pd->stroke.join;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
static void
|
||||
_ector_renderer_generic_shape_efl_graphics_shape_path_set(Eo *obj EINA_UNUSED,
|
||||
Ector_Renderer_Generic_Shape_Data *pd,
|
||||
const Efl_Graphics_Path_Command *cmd,
|
||||
|
@ -194,7 +194,17 @@ _ector_renderer_generic_shape_efl_graphics_shape_path_set(Eo *obj EINA_UNUSED,
|
|||
free(pd->path.pts);
|
||||
pd->path.pts = NULL;
|
||||
|
||||
return efl_graphics_path_dup(&pd->path.cmd, &pd->path.pts, cmd, points);
|
||||
efl_graphics_path_dup(&pd->path.cmd, &pd->path.pts, cmd, points);
|
||||
}
|
||||
|
||||
void
|
||||
_ector_renderer_generic_shape_efl_graphics_shape_path_get(Eo *obj EINA_UNUSED,
|
||||
Ector_Renderer_Generic_Shape_Data *pd,
|
||||
const Efl_Graphics_Path_Command **op,
|
||||
const double **points)
|
||||
{
|
||||
if (op) *op = pd->path.cmd;
|
||||
if (points) *points = pd->path.pts;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -69,13 +69,14 @@ interface Efl.Graphics.Shape
|
|||
Efl_Graphics_Join j;
|
||||
}
|
||||
}
|
||||
}
|
||||
methods {
|
||||
path_set {
|
||||
return: bool;
|
||||
params {
|
||||
@in const(Efl_Graphics_Path_Command) *op;
|
||||
@in const(double) *points;
|
||||
path {
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
const(Efl_Graphics_Path_Command) *op;
|
||||
const(double) *points;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ struct _Evas_VG_Shape_Data
|
|||
} stroke;
|
||||
};
|
||||
|
||||
static Eina_Bool
|
||||
static void
|
||||
_evas_vg_shape_efl_graphics_shape_path_set(Eo *obj EINA_UNUSED,
|
||||
Evas_VG_Shape_Data *pd,
|
||||
const Efl_Graphics_Path_Command *ops,
|
||||
|
@ -42,7 +42,17 @@ _evas_vg_shape_efl_graphics_shape_path_set(Eo *obj EINA_UNUSED,
|
|||
free(pd->ops);
|
||||
pd->ops = NULL;
|
||||
|
||||
return efl_graphics_path_dup(&pd->ops, &pd->points, ops, points);
|
||||
efl_graphics_path_dup(&pd->ops, &pd->points, ops, points);
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_vg_shape_efl_graphics_shape_path_get(Eo *obj EINA_UNUSED,
|
||||
Evas_VG_Shape_Data *pd,
|
||||
const Efl_Graphics_Path_Command **op,
|
||||
const double **points)
|
||||
{
|
||||
if (op) *op = pd->ops;
|
||||
if (points) *points = pd->points;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
|
|
@ -39,7 +39,7 @@ class Evas.VG_Shape (Evas.VG_Node, Efl.Graphics.Shape)
|
|||
Efl.Graphics.Shape.stroke_dash;
|
||||
Efl.Graphics.Shape.stroke_cap;
|
||||
Efl.Graphics.Shape.stroke_join;
|
||||
Efl.Graphics.Shape.path_set;
|
||||
Efl.Graphics.Shape.path;
|
||||
Evas.VG_Node.bound_get;
|
||||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
|
|
Loading…
Reference in New Issue