diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-17 22:55:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-17 22:55:08 +0300 |
commit | 53edaee89b6512f1d4d01ed5f83a9d335d104257 (patch) | |
tree | bac4fc0bcb7e237ba129bfcdf243ebe3d184a0fb /source/blender/windowmanager/intern/wm_subwindow.c | |
parent | 0c813b2a0ee4e293428caa3fc7d2b706377c92cf (diff) |
Fix #19431: gestures would sometimes draw incorrect, now ensures they
are always drawn in pixel space.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_subwindow.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_subwindow.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 00af9eb0bb9..decf1f0d676 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -405,6 +405,16 @@ void wmOrtho2(float x1, float x2, float y1, float y2) wmOrtho(x1, x2, y1, y2, -100, 100); } +void wmOrthoPixelSpace(void) +{ + if(_curswin) { + int width, height; + + wm_subwindow_getsize(_curwindow, _curswin->swinid, &width, &height); + wmOrtho2(-0.375, (float)width-0.375, -0.375, (float)height-0.375); + wmLoadIdentity(); + } +} /* *************************** Framebuffer color depth, for selection codes ********************** */ |