patch [#34586] Variable typo in glaDrawPixelsTexScaled
authorCampbell Barton <ideasman42@gmail.com>
Sun, 10 Mar 2013 07:01:52 +0000 (07:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 10 Mar 2013 07:01:52 +0000 (07:01 +0000)
from Andre D (andred)

xzoom was used where yzoom was meant to be used. Caused issues when xzoom and yzoom were not the same value.

source/blender/editors/screen/glutil.c

index 0844d63..f6e9b5e 100644 (file)
@@ -560,10 +560,10 @@ void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format,
                        glEnable(GL_TEXTURE_2D);
                        glBegin(GL_QUADS);
                        glTexCoord2f((float)(0 + offset_left) / tex_w, (float)(0 + offset_bot) / tex_h);
-                       glVertex2f(rast_x + (float)offset_left * xzoom, rast_y + (float)offset_bot * xzoom);
+                       glVertex2f(rast_x + (float)offset_left * xzoom, rast_y + (float)offset_bot * yzoom);
 
                        glTexCoord2f((float)(subpart_w - offset_right) / tex_w, (float)(0 + offset_bot) / tex_h);
-                       glVertex2f(rast_x + (float)(subpart_w - offset_right) * xzoom * scaleX, rast_y + (float)offset_bot * xzoom);
+                       glVertex2f(rast_x + (float)(subpart_w - offset_right) * xzoom * scaleX, rast_y + (float)offset_bot * yzoom);
 
                        glTexCoord2f((float)(subpart_w - offset_right) / tex_w, (float)(subpart_h - offset_top) / tex_h);
                        glVertex2f(rast_x + (float)(subpart_w - offset_right) * xzoom * scaleX, rast_y + (float)(subpart_h - offset_top) * yzoom * scaleY);