Added a green "out of bounds" area to test/page7c.c. For some reason it doesn't show up here... will need to look further.

This commit is contained in:
Pietro Gagliardi 2015-12-19 14:54:24 -05:00
parent af374ed859
commit b5d257409c
1 changed files with 20 additions and 0 deletions

View File

@ -24,6 +24,20 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *dp)
memset(&brush, 0, sizeof (uiDrawBrush));
memset(&sp, 0, sizeof (uiDrawStrokeParams));
// add some buffering to detect scrolls that aren't on the dot and to see what happens when areas outside the scroll area are drawn
path = uiDrawNewPath(uiDrawFillModeWinding);
uiDrawPathAddRectangle(path,
-50, -50,
areaSize + 50, areaSize + 50);
uiDrawPathEnd(path);
brush.Type = uiDrawBrushTypeSolid;
brush.R = 0;
brush.G = 1;
brush.B = 0;
brush.A = 1;
uiDrawFill(dp->Context, path, &brush);
uiDrawFreePath(path);
path = uiDrawNewPath(uiDrawFillModeWinding);
uiDrawPathAddRectangle(path,
0, 0,
@ -31,6 +45,12 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *dp)
uiDrawPathEnd(path);
brush.Type = uiDrawBrushTypeSolid;
brush.R = 1;
brush.G = 1;
brush.B = 1;
brush.A = 1;
uiDrawFill(dp->Context, path, &brush);
brush.Type = uiDrawBrushTypeSolid;
brush.R = 1;
brush.G = 0;
brush.B = 0;
brush.A = 1;