From 3870080d3f22a7ecf93d67bfb2ea3d155bd9e009 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 10 May 2008 12:43:53 +0000 Subject: [PATCH] sequencer non-square-pixel display didnt offset correctly, also made this only work with images. (not luma waveforms etc) --- source/blender/src/drawseq.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index 5e8e1783540..e979f6e16fc 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -857,15 +857,18 @@ static void draw_image_seq(ScrArea *sa) zoom = -1.0/sseq->zoom; } - /* calc location */ - x1= (sa->winx-zoom*ibuf->x)/2 + sseq->xof; - y1= (sa->winy-zoom*ibuf->y)/2 + sseq->yof; - /* needed for gla draw */ glaDefine2DArea(&curarea->winrct); + if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) { + zoomx = zoom * ((float)G.scene->r.xasp / (float)G.scene->r.yasp); + zoomy = zoom; + } else { + zoomx = zoomy = zoom; + } - zoomx = zoom * ((float)G.scene->r.xasp / (float)G.scene->r.yasp); - zoomy = zoom; + /* calc location */ + x1= (sa->winx-zoomx*ibuf->x)/2 + sseq->xof; + y1= (sa->winy-zoomy*ibuf->y)/2 + sseq->yof; glPixelZoom(zoomx, zoomy);