* make sure that the pattern used for line arrays is B_SOLID_HIGH

and that the previous pattern is restored after execution


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21853 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2007-08-08 18:30:28 +00:00
parent aaa42c7e22
commit a748b927a5

View File

@ -1002,8 +1002,13 @@ DrawingEngine::StrokeLineArray(int32 numLines,
data = (const LineArrayData *)&(linedata[0]);
// store current graphics state, we mess with the
// high color and pattern...
rgb_color oldColor = fPainter->HighColor();
struct pattern pattern = fPainter->Pattern();
fPainter->SetHighColor(data->color);
fPainter->SetPattern(B_SOLID_HIGH);
fPainter->StrokeLine(data->pt1, data->pt2);
for (int32 i = 1; i < numLines; i++) {
@ -1012,8 +1017,9 @@ DrawingEngine::StrokeLineArray(int32 numLines,
fPainter->StrokeLine(data->pt1, data->pt2);
}
// restore correct drawing state highcolor
// restore correct drawing state highcolor and pattern
fPainter->SetHighColor(oldColor);
fPainter->SetPattern(pattern);
fGraphicsCard->Invalidate(touched);
if (cursorTouched)