forked from enlightenment/efl
efl_canvas_vg image: changed image parameter type.
it's still in improvement stage in beta.
This commit is contained in:
parent
2e37d2f30f
commit
44363bb70f
|
@ -95,20 +95,20 @@ _efl_canvas_vg_image_efl_object_destructor(Eo *obj, Efl_Canvas_Vg_Image_Data *pd
|
|||
}
|
||||
|
||||
static void
|
||||
_efl_canvas_vg_image_data_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Image_Data *pd, void *data, int w, int h)
|
||||
_efl_canvas_vg_image_data_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Image_Data *pd, void *data, Eina_Size2D size)
|
||||
{
|
||||
if (!data || w <= 0 || h <= 0)
|
||||
if (!data || size.w <= 0 || size.h <= 0)
|
||||
return;
|
||||
|
||||
if ((pd->image != data || pd->w != w || pd->h != h) && pd->buffer)
|
||||
if ((pd->image != data || pd->w != size.w || pd->h != size.h) && pd->buffer)
|
||||
{
|
||||
efl_unref(pd->buffer);
|
||||
pd->buffer= NULL;
|
||||
}
|
||||
|
||||
pd->image = data;
|
||||
pd->w = w;
|
||||
pd->h = h;
|
||||
pd->w = size.w;
|
||||
pd->h = size.h;
|
||||
}
|
||||
|
||||
#include "efl_canvas_vg_image.eo.c"
|
||||
|
|
|
@ -8,8 +8,7 @@ class @beta Efl.Canvas.Vg.Image extends Efl.Canvas.Vg.Node implements Efl.Gfx.Im
|
|||
}
|
||||
values {
|
||||
pixels: void_ptr; [[Image pixels data. The pixel data type is 32bit RGBA]]
|
||||
w : int;
|
||||
h : int;
|
||||
size: Eina.Size2D; [[The size in pixels.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
|
|||
node->mImageInfo.mMatrix.m31, node->mImageInfo.mMatrix.m32, node->mImageInfo.mMatrix.m33);
|
||||
efl_canvas_vg_node_transformation_set(image, &m);
|
||||
|
||||
efl_canvas_vg_image_data_set(image, node->mImageInfo.data, node->mImageInfo.width, node->mImageInfo.height);
|
||||
efl_canvas_vg_image_data_set(image, node->mImageInfo.data, EINA_SIZE2D(node->mImageInfo.width, node->mImageInfo.height));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue