aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/evas/src/modules/engines/gl_common/evas_gl_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/evas/src/modules/engines/gl_common/evas_gl_api.c')
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_api.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_api.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_api.c
index f40d214e55..99e0508b3f 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_api.c
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_api.c
@@ -158,13 +158,14 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
int x, int y, int width, int height,
int imgc[4], int objc[4])
{
+ Evas_Object_Protected_Data *pd = eo_data_get(obj, EVAS_OBJ_CLASS);
if (rot == 0)
{
// oringinal image object coordinate in gl coordinate
- imgc[0] = obj->cur.geometry.x;
- imgc[1] = obj->layer->evas->output.h - obj->cur.geometry.y - obj->cur.geometry.h;
- imgc[2] = imgc[0] + obj->cur.geometry.w;
- imgc[3] = imgc[1] + obj->cur.geometry.h;
+ imgc[0] = pd->cur.geometry.x;
+ imgc[1] = pd->layer->evas->output.h - pd->cur.geometry.y - pd->cur.geometry.h;
+ imgc[2] = imgc[0] + pd->cur.geometry.w;
+ imgc[3] = imgc[1] + pd->cur.geometry.h;
// transformed (x,y,width,height) in gl coordinate
objc[0] = imgc[0] + x;
@@ -175,14 +176,14 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
else if (rot == 180)
{
// oringinal image object coordinate in gl coordinate
- imgc[0] = obj->layer->evas->output.w - obj->cur.geometry.x - obj->cur.geometry.w;
- imgc[1] = obj->cur.geometry.y;
- imgc[2] = imgc[0] + obj->cur.geometry.w;
- imgc[3] = imgc[1] + obj->cur.geometry.h;
+ imgc[0] = pd->layer->evas->output.w - pd->cur.geometry.x - pd->cur.geometry.w;
+ imgc[1] = pd->cur.geometry.y;
+ imgc[2] = imgc[0] + pd->cur.geometry.w;
+ imgc[3] = imgc[1] + pd->cur.geometry.h;
// transformed (x,y,width,height) in gl coordinate
- objc[0] = imgc[0] + obj->cur.geometry.w - x - width;
- objc[1] = imgc[1] + obj->cur.geometry.h - y - height;
+ objc[0] = imgc[0] + pd->cur.geometry.w - x - width;
+ objc[1] = imgc[1] + pd->cur.geometry.h - y - height;
objc[2] = objc[0] + width;
objc[3] = objc[1] + height;
@@ -190,13 +191,13 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
else if (rot == 90)
{
// oringinal image object coordinate in gl coordinate
- imgc[0] = obj->cur.geometry.y;
- imgc[1] = obj->cur.geometry.x;
- imgc[2] = imgc[0] + obj->cur.geometry.h;
- imgc[3] = imgc[1] + obj->cur.geometry.w;
+ imgc[0] = pd->cur.geometry.y;
+ imgc[1] = pd->cur.geometry.x;
+ imgc[2] = imgc[0] + pd->cur.geometry.h;
+ imgc[3] = imgc[1] + pd->cur.geometry.w;
// transformed (x,y,width,height) in gl coordinate
- objc[0] = imgc[0] + obj->cur.geometry.h - y - height;
+ objc[0] = imgc[0] + pd->cur.geometry.h - y - height;
objc[1] = imgc[1] + x;
objc[2] = objc[0] + height;
objc[3] = objc[1] + width;
@@ -204,14 +205,14 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip,
else if (rot == 270)
{
// oringinal image object coordinate in gl coordinate
- imgc[0] = obj->layer->evas->output.h - obj->cur.geometry.y - obj->cur.geometry.h;
- imgc[1] = obj->layer->evas->output.w - obj->cur.geometry.x - obj->cur.geometry.w;
- imgc[2] = imgc[0] + obj->cur.geometry.h;
- imgc[3] = imgc[1] + obj->cur.geometry.w;
+ imgc[0] = pd->layer->evas->output.h - pd->cur.geometry.y - pd->cur.geometry.h;
+ imgc[1] = pd->layer->evas->output.w - pd->cur.geometry.x - pd->cur.geometry.w;
+ imgc[2] = imgc[0] + pd->cur.geometry.h;
+ imgc[3] = imgc[1] + pd->cur.geometry.w;
// transformed (x,y,width,height) in gl coordinate
objc[0] = imgc[0] + y;
- objc[1] = imgc[1] + obj->cur.geometry.w - x - width;
+ objc[1] = imgc[1] + pd->cur.geometry.w - x - width;
objc[2] = objc[0] + height;
objc[3] = objc[1] + width;
}