diff options
author | Anthony Edlin <akrashe@gmail.com> | 2013-11-25 16:40:58 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-25 17:26:45 +0400 |
commit | e626998a262ebe4f621b88eb09ece1a48c1a3ef8 (patch) | |
tree | 70a27361ecee4c639acf17d2c9c8cdde58c72689 /source/blender/editors/screen/screen_intern.h | |
parent | ab9822eff8865846d3c7ef81ff30cc35cb48ae0c (diff) |
UI: fix errors in screen edge drawing, moving and region hiding.
Summary:
- Fixes an off-by-one error in screen_test_scale() which causes the areas and
regions to draw one pixel bigger on the right and top side of the window,
therefor hiding one line of pixels.
- Fixes an off-by-one error in rct_fits() which causes regions to incorrectly
hide even though it would fit inside the area.
- Correctly set the limits for the screen edge move operator so it will always
go up to AREAMINX and headery.
- Change screen_find_active_scredge() so it doesn't show the arrows cursor on
the screen edges along the window border.
The import thing to understand is how integer rects are used in this part of the
code. They are constructed as a lower left and top right point and are INCLUSIVE.
Meaning that if you have a rect's xmin = 10 and xmax = 30 then the total number
of pixels is 21. So to get the size of a rect you have to do xmax - xmin + 1,
which is easy to forget and result in off-by-one errors.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D41
Diffstat (limited to 'source/blender/editors/screen/screen_intern.h')
-rw-r--r-- | source/blender/editors/screen/screen_intern.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index b811fc46188..e366a336587 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -53,7 +53,7 @@ void removedouble_scrverts(bScreen *sc); void removedouble_scredges(bScreen *sc); void removenotused_scredges(bScreen *sc); int scredge_is_horizontal(ScrEdge *se); -ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my); +ScrEdge *screen_find_active_scredge(bScreen *sc, int winsizex, int winsizey, int mx, int my); struct AZone *is_in_area_actionzone(ScrArea *sa, const int xy[2]); |