StrokeLineArray now uses the BView LineArray API internally
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4730 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1065,13 +1065,8 @@ void ViewDriver::StrokeLineArray(BPoint *pts, int32 numlines, RGBColor *colors,
|
|||||||
framebuffer->Lock();
|
framebuffer->Lock();
|
||||||
SetLayerData(d);
|
SetLayerData(d);
|
||||||
|
|
||||||
// Do LineArray stuff here.
|
// Old stand-in for real StrokeLineArray stuff
|
||||||
|
/* int32 ptindex=0;
|
||||||
// drawview->Sync();
|
|
||||||
// screenwin->view->Invalidate();
|
|
||||||
|
|
||||||
// for now, just print the data and hope we don't crash
|
|
||||||
int32 ptindex=0;
|
|
||||||
|
|
||||||
for(int32 i=0; i<numlines; i++)
|
for(int32 i=0; i<numlines; i++)
|
||||||
{
|
{
|
||||||
@@ -1083,6 +1078,22 @@ void ViewDriver::StrokeLineArray(BPoint *pts, int32 numlines, RGBColor *colors,
|
|||||||
drawview->StrokeLine(pt1,pt2,B_SOLID_HIGH);
|
drawview->StrokeLine(pt1,pt2,B_SOLID_HIGH);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
int32 ptindex=0;
|
||||||
|
|
||||||
|
drawview->BeginLineArray(numlines);
|
||||||
|
for(int32 i=0; i<numlines; i++)
|
||||||
|
{
|
||||||
|
BPoint pt1=pts[ptindex++];
|
||||||
|
BPoint pt2=pts[ptindex++];
|
||||||
|
rgb_color col=colors[i].GetColor32();
|
||||||
|
|
||||||
|
drawview->AddLine(pt1,pt2,col);
|
||||||
|
|
||||||
|
}
|
||||||
|
drawview->EndLineArray();
|
||||||
|
|
||||||
drawview->Sync();
|
drawview->Sync();
|
||||||
screenwin->view->Invalidate();
|
screenwin->view->Invalidate();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user