Appearantly StrokeLineArray is used in BButton rendering.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12210 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1097,8 +1097,29 @@ DisplayDriverPainter::StrokeLineArray(const int32 &numlines,
|
|||||||
const LineArrayData *linedata,
|
const LineArrayData *linedata,
|
||||||
const DrawData *d)
|
const DrawData *d)
|
||||||
{
|
{
|
||||||
// I'm suspecting this is not used
|
if(!d || !linedata || numlines <= 0)
|
||||||
printf("DisplayDriverPainter::StrokeLineArray()\n");
|
return;
|
||||||
|
|
||||||
|
if (Lock()) {
|
||||||
|
DrawData d;
|
||||||
|
d.draw_mode = B_OP_COPY;
|
||||||
|
const LineArrayData *data;
|
||||||
|
|
||||||
|
data = (const LineArrayData *)&(linedata[0]);
|
||||||
|
d.highcolor = data->color;
|
||||||
|
fPainter->SetDrawData(&d);
|
||||||
|
BRect touched = fPainter->StrokeLine(data->pt1, data->pt2);
|
||||||
|
|
||||||
|
for (int32 i = 1; i < numlines; i++) {
|
||||||
|
data = (const LineArrayData *)&(linedata[i]);
|
||||||
|
d.highcolor = data->color;
|
||||||
|
fPainter->SetDrawData(&d);
|
||||||
|
touched = touched | fPainter->StrokeLine(data->pt1, data->pt2);
|
||||||
|
}
|
||||||
|
|
||||||
|
fGraphicsCard->Invalidate(touched);
|
||||||
|
Unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDPMSMode
|
// SetDPMSMode
|
||||||
|
|||||||
Reference in New Issue
Block a user