From af092210dbda8a8712d4c307e7425470015fe8c5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 8 Mar 2005 19:18:40 +0000 Subject: - switch draW_bgpic to calculate window coordinates as floats, smoother zooming of background pic now. --- source/blender/src/drawview.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 663c3b571a8..e2911a5257e 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -336,7 +336,7 @@ static void draw_bgpic(void) BGpic *bgpic; Image *ima; float vec[4], fac, asp, zoomx, zoomy; - int x1, y1, x2, y2, cx, cy; + float x1, y1, x2, y2, cx, cy; bgpic= G.vd->bgpic; if(bgpic==0) return; @@ -425,10 +425,8 @@ static void draw_bgpic(void) if(x1 > curarea->winx ) return; if(y1 > curarea->winy ) return; - zoomx= x2-x1; - zoomx /= (float)ima->ibuf->x; - zoomy= y2-y1; - zoomy /= (float)ima->ibuf->y; + zoomx= (x2-x1)/ima->ibuf->x; + zoomy= (y2-y1)/ima->ibuf->y; glEnable(GL_BLEND); if(G.zbuf) glDisable(GL_DEPTH_TEST); -- cgit v1.2.3