forked from enlightenment/efl
ector: fix transform issue in cairo backend.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
72967efd9d
commit
6c64f2db74
|
@ -73,7 +73,6 @@ _ector_cairo_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
|
||||||
|
|
||||||
typedef struct _cairo_surface_t cairo_surface_t;
|
typedef struct _cairo_surface_t cairo_surface_t;
|
||||||
|
|
||||||
static void (*cairo_translate)(cairo_t *cr, double tx, double ty) = NULL;
|
|
||||||
static void (*cairo_destroy)(cairo_t *cr) = NULL;
|
static void (*cairo_destroy)(cairo_t *cr) = NULL;
|
||||||
static cairo_surface_t *(*cairo_image_surface_create)(int format,
|
static cairo_surface_t *(*cairo_image_surface_create)(int format,
|
||||||
int width,
|
int width,
|
||||||
|
@ -118,11 +117,8 @@ _ector_cairo_surface_ector_generic_surface_reference_point_set(Eo *obj EINA_UNUS
|
||||||
Ector_Cairo_Surface_Data *pd,
|
Ector_Cairo_Surface_Data *pd,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
if (pd->cairo)
|
pd->current.x = x;
|
||||||
{
|
pd->current.y = y;
|
||||||
USE(obj, cairo_translate, );
|
|
||||||
cairo_translate(pd->cairo, x, y);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -170,15 +170,13 @@ _ector_renderer_cairo_base_ector_renderer_generic_base_draw(Eo *obj,
|
||||||
|
|
||||||
cairo_set_operator(pd->parent->cairo, cop);
|
cairo_set_operator(pd->parent->cairo, cop);
|
||||||
cairo_transform(pd->parent->cairo, &identity);
|
cairo_transform(pd->parent->cairo, &identity);
|
||||||
cx = pd->generic->origin.x - pd->parent->current.x;
|
cx = pd->generic->origin.x + pd->parent->current.x;
|
||||||
cy = pd->generic->origin.y - pd->parent->current.y;
|
cy = pd->generic->origin.y + pd->parent->current.y;
|
||||||
|
|
||||||
cairo_translate(pd->parent->cairo, cx, cy);
|
cairo_translate(pd->parent->cairo, cx, cy);
|
||||||
|
|
||||||
if (pd->m) cairo_transform(pd->parent->cairo, pd->m);
|
if (pd->m) cairo_transform(pd->parent->cairo, pd->m);
|
||||||
|
|
||||||
pd->parent->current.x = pd->generic->origin.x;
|
|
||||||
pd->parent->current.y = pd->generic->origin.y;
|
|
||||||
|
|
||||||
cairo_set_source_rgba(pd->parent->cairo, r/255.0, g/255.0, b/255.0, a/255.0);
|
cairo_set_source_rgba(pd->parent->cairo, r/255.0, g/255.0, b/255.0, a/255.0);
|
||||||
|
|
||||||
USE(obj, cairo_new_path, EINA_FALSE);
|
USE(obj, cairo_new_path, EINA_FALSE);
|
||||||
|
|
Loading…
Reference in New Issue