From 63c984f193739622b2f1523604d841227eeea63e Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 3 Dec 2009 14:46:20 +0000 Subject: [PATCH] cogl-sub-texture: Fix the height of sub textures The code which is used to get the texture height was accidentally using the width due to a cut-and-paste fail. --- cogl/cogl-sub-texture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cogl/cogl-sub-texture.c b/cogl/cogl-sub-texture.c index a8e164160..d0213fe88 100644 --- a/cogl/cogl-sub-texture.c +++ b/cogl/cogl-sub-texture.c @@ -370,10 +370,10 @@ static void _cogl_sub_texture_get_y_pixel_pos (CoglSubTexture *sub_tex, gint *py1, gint *py2) { - gint full_width = cogl_texture_get_width (sub_tex->full_texture); + gint full_height = cogl_texture_get_height (sub_tex->full_texture); - *py1 = full_width * sub_tex->ty1; - *py2 = full_width * sub_tex->ty2; + *py1 = full_height * sub_tex->ty1; + *py2 = full_height * sub_tex->ty2; if (*py1 > *py2) {