Updated to match changes to DisplayDriver::StrokeLineArray
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9376 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -133,15 +133,22 @@ void PreviewDriver::InvertRect(const BRect &r)
|
|||||||
view->viewbmp->Unlock();
|
view->viewbmp->Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewDriver::StrokeLineArray(BPoint *pts, const int32 &numlines, const DrawData *d, RGBColor *colors)
|
void PreviewDriver::StrokeLineArray(const int32 &numlines, const LineArrayData *linedata,
|
||||||
|
const DrawData *d)
|
||||||
{
|
{
|
||||||
|
if(!linedata || !d)
|
||||||
|
return;
|
||||||
|
|
||||||
view->viewbmp->Lock();
|
view->viewbmp->Lock();
|
||||||
drawview->SetHighColor(d->highcolor.GetColor32());
|
drawview->SetHighColor(d->highcolor.GetColor32());
|
||||||
drawview->SetLowColor(d->lowcolor.GetColor32());
|
drawview->SetLowColor(d->lowcolor.GetColor32());
|
||||||
drawview->SetPenSize(d->pensize);
|
drawview->SetPenSize(d->pensize);
|
||||||
drawview->BeginLineArray(numlines);
|
drawview->BeginLineArray(numlines);
|
||||||
for(int32 i=0; i<numlines; i++)
|
for(int32 i=0; i<numlines; i++)
|
||||||
drawview->AddLine(pts[2*i],pts[(2*i)+1],colors[i].GetColor32());
|
{
|
||||||
|
const LineArrayData *data=&(linedata[i]);
|
||||||
|
drawview->AddLine(data->pt1,data->pt2,data->color);
|
||||||
|
}
|
||||||
drawview->EndLineArray();
|
drawview->EndLineArray();
|
||||||
drawview->Sync();
|
drawview->Sync();
|
||||||
view->Invalidate();
|
view->Invalidate();
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
void InvertRect(const BRect &r);
|
void InvertRect(const BRect &r);
|
||||||
|
|
||||||
virtual void StrokeLineArray(BPoint *pts, const int32 &numlines, const DrawData *d, RGBColor *colors);
|
virtual void StrokeLineArray(const int32 &numlines, const LineArrayData *linedata,const DrawData *d);
|
||||||
|
|
||||||
void SetMode(const int32 &mode);
|
void SetMode(const int32 &mode);
|
||||||
void SetMode(const display_mode &mode);
|
void SetMode(const display_mode &mode);
|
||||||
|
|||||||
Reference in New Issue
Block a user