Fixed improper initialization of uiDrawStrokeParams in the histogram example.

This commit is contained in:
Pietro Gagliardi 2015-12-04 21:10:27 -05:00
parent 8084041139
commit 79e00d3c90
1 changed files with 4 additions and 0 deletions

View File

@ -106,6 +106,10 @@ static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams *p)
// figure out dimensions
graphSize(p->ClientWidth, p->ClientHeight, &graphWidth, &graphHeight);
// clear sp to avoid passing garbage to uiDrawStroke()
// for example, we don't use dashing
memset(&sp, 0, sizeof (uiDrawStrokeParams));
// make a stroke for both the axes and the histogram line
sp.Cap = uiDrawLineCapFlat;
sp.Join = uiDrawLineJoinMiter;