Blender Git Commit Log

Git Commits -> Revision e626998

Revision e626998 by Anthony Edlin (master)
November 25, 2013, 13:26 (GMT)
UI: fix errors in screen edge drawing, moving and region hiding.

- 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:

Commit Details:

Full Hash: e626998a262ebe4f621b88eb09ece1a48c1a3ef8
Parent Commit: ab9822e
Committed By: Brecht Van Lommel
Lines Changed: +116, -56

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2021