diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-03-08 22:18:40 +0300 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-03-08 22:18:40 +0300 |
commit | af092210dbda8a8712d4c307e7425470015fe8c5 (patch) | |
tree | 72158d2ab88243f4f4907119b0cde3d13fd66f2b | |
parent | a26d91fddf813e5a9d3233f71a1da4618283e8c8 (diff) |
- switch draW_bgpic to calculate window coordinates as floats, smoother
zooming of background pic now.
-rw-r--r-- | source/blender/src/drawview.c | 8 |
1 files 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); |