diff options
author | Ton Roosendaal <ton@blender.org> | 2009-07-19 16:15:20 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-07-19 16:15:20 +0400 |
commit | f72018ebeb841c9aa677b4f51e1d28a56e8565a7 (patch) | |
tree | f88b68bd059ab3ba981df939fe1bd06aa73b9134 /source/blender/editors/screen/area.c | |
parent | 26ec00d567520d9c2a5f99e4884ebc0cd63a6656 (diff) |
2.5
Small fix: Triple Buffer mode didn't clip custom paint cursors correctly
for overlapping regions (example, view3d paint circle drawing into toolbar)
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index e84aab787c1..cdb4322d7f2 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -274,6 +274,28 @@ static void region_scissor_winrct(ARegion *ar, rcti *winrct) } /* only exported for WM */ +/* makes region ready for drawing, sets pixelspace */ +void ED_region_set(const bContext *C, ARegion *ar) +{ + wmWindow *win= CTX_wm_window(C); + ScrArea *sa= CTX_wm_area(C); + rcti winrct; + + /* checks other overlapping regions */ + region_scissor_winrct(ar, &winrct); + + ar->drawrct= winrct; + + /* note; this sets state, so we can use wmOrtho and friends */ + wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct); + + UI_SetTheme(sa?sa->spacetype:0, ar->type?ar->type->regionid:0); + + ED_region_pixelspace(ar); +} + + +/* only exported for WM */ void ED_region_do_draw(bContext *C, ARegion *ar) { wmWindow *win= CTX_wm_window(C); |