ector: implement surface size property.

This commit is contained in:
Cedric BAIL 2015-04-03 16:34:24 +02:00
parent 0d95e53932
commit 39f7ce192c
3 changed files with 13 additions and 4 deletions

View File

@ -10,20 +10,25 @@
typedef struct _Ector_Generic_Surface_Data Ector_Generic_Surface_Data;
struct _Ector_Generic_Surface_Data
{
int w, h;
};
void
_ector_generic_surface_size_set(Eo *obj,
_ector_generic_surface_size_set(Eo *obj EINA_UNUSED,
Ector_Generic_Surface_Data *pd,
int w, int h)
{
pd->w = w;
pd->h = h;
}
void
_ector_generic_surface_size_get(Eo *obj,
_ector_generic_surface_size_get(Eo *obj EINA_UNUSED,
Ector_Generic_Surface_Data *pd,
int *w, int *h)
{
if (w) *w = pd->w;
if (h) *h = pd->h;
}
#include "ector_generic_surface.eo.c"

View File

@ -2524,7 +2524,9 @@ _ector_cairo_software_surface_surface_set(Eo *obj, Ector_Cairo_Software_Surface_
pd->height = height;
end:
eo_do(obj, ector_cairo_surface_context_set(pd->ctx));
eo_do(obj,
ector_cairo_surface_context_set(pd->ctx),
ector_surface_size_set(pd->width, pd->height));
}
static void

View File

@ -5073,7 +5073,9 @@ _ector_cairo_software_surface_surface_set(Eo *obj, Ector_Cairo_Software_Surface_
end:
evas_common_cpu_end_opt();
eo_do(obj, ector_cairo_surface_context_set(pd->ctx));
eo_do(obj,
ector_cairo_surface_context_set(pd->ctx),
ector_surface_size_set(pd->width, pd->height));
}
void