#include "evas_vg_private.h"
#include <string.h>
+#include <math.h>
#define MY_CLASS EVAS_VG_NODE_CLASS
}
void
-_evas_vg_node_visibility_set(Eo *obj EINA_UNUSED,
- Evas_VG_Node_Data *pd,
- Eina_Bool v)
+_evas_vg_node_efl_gfx_base_position_set(Eo *obj EINA_UNUSED,
+ Evas_VG_Node_Data *pd,
+ int x, int y)
+{
+ pd->x = lrint(x);
+ pd->y = lrint(y);
+}
+
+void
+_evas_vg_node_efl_gfx_base_position_get(Eo *obj EINA_UNUSED,
+ Evas_VG_Node_Data *pd,
+ int *x, int *y)
+{
+ if (x) *x = pd->x;
+ if (y) *y = pd->y;
+}
+
+void
+_evas_vg_node_efl_gfx_base_visible_set(Eo *obj EINA_UNUSED,
+ Evas_VG_Node_Data *pd, Eina_Bool v)
{
pd->visibility = v;
}
+
Eina_Bool
-_evas_vg_node_visibility_get(Eo *obj EINA_UNUSED, Evas_VG_Node_Data *pd)
+_evas_vg_node_efl_gfx_base_visible_get(Eo *obj EINA_UNUSED,
+ Evas_VG_Node_Data *pd)
{
return pd->visibility;
}
void
-_evas_vg_node_color_set(Eo *obj EINA_UNUSED,
- Evas_VG_Node_Data *pd,
- int r, int g, int b, int a)
+_evas_vg_node_efl_gfx_base_color_set(Eo *obj EINA_UNUSED,
+ Evas_VG_Node_Data *pd,
+ int r, int g, int b, int a)
{
pd->r = r;
pd->g = g;
}
void
-_evas_vg_node_color_get(Eo *obj EINA_UNUSED,
- Evas_VG_Node_Data *pd,
- int *r, int *g, int *b, int *a)
+_evas_vg_node_efl_gfx_base_color_get(Eo *obj EINA_UNUSED,
+ Evas_VG_Node_Data *pd,
+ int *r, int *g, int *b, int *a)
{
if (r) *r = pd->r;
if (g) *g = pd->g;
return pd->mask;
}
+void
+_evas_vg_node_efl_gfx_base_size_get(Eo *obj,
+ Evas_VG_Node_Data *pd EINA_UNUSED,
+ int *w, int *h)
+{
+ Eina_Rectangle bound = { 0, 0, 0, 0 };
+
+ eo_do(obj, evas_vg_node_bound_get(&bound));
+ if (w) *w = bound.w;
+ if (h) *h = bound.h;
+}
+
// Parent should be a container otherwise dismissing the stacking operation
static Eina_Bool
_evas_vg_node_parent_checked_get(Eo *obj,
-abstract Evas.VG_Node (Eo.Base)
+abstract Evas.VG_Node (Eo.Base, Efl.Gfx.Base)
{
eo_prefix: evas_vg_node;
legacy_prefix: null;
double y;
}
}
- visibility {
- set {
- /*@ Makes the given Evas_VG node visible or invisible. */
- }
- get {
- /*@ Retrieves whether or not the given Evas_VG node is visible. */
- }
- values {
- Eina_Bool v; /*@ @c EINA_TRUE if to make the object visible,
- @c EINA_FALSE otherwise */
- }
- }
- color {
- set {
- /*@
- Sets the general/main color of the given Evas_VG node to the given
- one.
- @note These color values are expected to be premultiplied by @p a.
- @ingroup Evas_VG_Node_Group */
- }
- get {
- /*@
- Retrieves the general/main color of the given Evas_VG node.
- Retrieves the “main” color's RGB component (and alpha channel)
- values, <b>which range from 0 to 255</b>. 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 @c NULL pointers on the components you're not
- interested in: they'll be ignored by the function.
- @ingroup Evas_VG_Node_Group */
- }
- values {
- int r; /*@ The red component of the given color. */
- int g; /*@ The green component of the given color. */
- int b; /*@ The blue component of the given color. */
- int a; /*@ The alpha component of the given color. */
- }
- }
mask {
set {
}
implements {
Eo.Base.parent.set;
Eo.Base.constructor;
+ Efl.Gfx.Base.visible.set;
+ Efl.Gfx.Base.visible.get;
+ Efl.Gfx.Base.color.set;
+ Efl.Gfx.Base.color.get;
+ Efl.Gfx.Base.size.get;
+ Efl.Gfx.Base.position.set;
+ Efl.Gfx.Base.position.get;
@virtual .bound_get;
}
}