diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-09-10 07:24:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-09-10 07:37:53 +0400 |
commit | 1b94b3d49c83db16297bd445b19e7384084386d4 (patch) | |
tree | 2e347f03ec89540e43bfbb5ed83a97c95f0692c1 /source/blender/windowmanager/WM_api.h | |
parent | 5202fca6d51f31fab102d3a925df02efd5c934f5 (diff) |
WM: Add utility wmOrtho2_*** funcs
Currently there are inconsistencies with pixel alignment.
but this commit has no functional changes.
- wmOrtho2_region_ui for UI/Text.
- wmOrtho2_region_pixelspace for 2D drawing.
- wmOrtho2_pixelspace - when the region isn't used.
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 35b7fb4b9c9..e1cd334637a 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -361,6 +361,10 @@ void wmSubWindowScissorSet (struct wmWindow *win, int swinid, const struct rcti void wmFrustum (float x1, float x2, float y1, float y2, float n, float f); void wmOrtho (float x1, float x2, float y1, float y2, float n, float f); void wmOrtho2 (float x1, float x2, float y1, float y2); + /* use for conventions (avoid hard-coded offsets all over) */ +void wmOrtho2_region_pixelspace(const struct ARegion *ar); +void wmOrtho2_region_ui(const struct ARegion *ar); +void wmOrtho2_pixelspace(const float x, const float y); /* utilities */ void WM_framebuffer_index_set(int index); |