Updated to match the change to DisplayDriver::StrokeLineArray
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9375 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -519,9 +519,8 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
|||||||
|
|
||||||
// Data specifically for the StrokeLineArray call.
|
// Data specifically for the StrokeLineArray call.
|
||||||
int32 numlines=0, maxlines=20;
|
int32 numlines=0, maxlines=20;
|
||||||
|
|
||||||
BPoint points[maxlines*2];
|
LineArrayData linedata[maxlines], *currentdata;
|
||||||
RGBColor colors[maxlines];
|
|
||||||
|
|
||||||
// For quick calculation of gradients for each side. Top is same as left, right is same as
|
// For quick calculation of gradients for each side. Top is same as left, right is same as
|
||||||
// bottom
|
// bottom
|
||||||
@@ -609,9 +608,10 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
|||||||
end.y=MIN(end.y-borderwidth,invalid.bottom);
|
end.y=MIN(end.y-borderwidth,invalid.bottom);
|
||||||
|
|
||||||
// Make the appropriate
|
// Make the appropriate
|
||||||
points[numlines*2]=start;
|
currentdata=&(linedata[numlines]);
|
||||||
points[(numlines*2)+1]=end;
|
currentdata->pt1=start;
|
||||||
colors[numlines]=framecolors[rightindices[colorindex]];
|
currentdata->pt2=end;
|
||||||
|
currentdata->color=framecolors[rightindices[colorindex]].GetColor32();
|
||||||
colorindex+=step;
|
colorindex+=step;
|
||||||
numlines++;
|
numlines++;
|
||||||
}
|
}
|
||||||
@@ -660,9 +660,10 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
|||||||
end.y=MIN(end.y-borderwidth,invalid.bottom);
|
end.y=MIN(end.y-borderwidth,invalid.bottom);
|
||||||
|
|
||||||
// Make the appropriate
|
// Make the appropriate
|
||||||
points[numlines*2]=start;
|
currentdata=&(linedata[numlines]);
|
||||||
points[(numlines*2)+1]=end;
|
currentdata->pt1=start;
|
||||||
colors[numlines]=framecolors[leftindices[colorindex]];
|
currentdata->pt2=end;
|
||||||
|
currentdata->color=framecolors[leftindices[colorindex]].GetColor32();
|
||||||
colorindex+=step;
|
colorindex+=step;
|
||||||
numlines++;
|
numlines++;
|
||||||
}
|
}
|
||||||
@@ -714,11 +715,12 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
|||||||
end.x=MIN(end.x-borderwidth,invalid.right);
|
end.x=MIN(end.x-borderwidth,invalid.right);
|
||||||
|
|
||||||
// Make the appropriate
|
// Make the appropriate
|
||||||
points[numlines*2]=start;
|
currentdata=&(linedata[numlines]);
|
||||||
points[(numlines*2)+1]=end;
|
currentdata->pt1=start;
|
||||||
|
currentdata->pt2=end;
|
||||||
|
|
||||||
// Top side uses the same color order as the left one
|
// Top side uses the same color order as the left one
|
||||||
colors[numlines]=framecolors[leftindices[colorindex]];
|
currentdata->color=framecolors[leftindices[colorindex]].GetColor32();
|
||||||
colorindex+=step;
|
colorindex+=step;
|
||||||
numlines++;
|
numlines++;
|
||||||
}
|
}
|
||||||
@@ -770,20 +772,21 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
|||||||
end.x=MIN(end.x-borderwidth,invalid.right);
|
end.x=MIN(end.x-borderwidth,invalid.right);
|
||||||
|
|
||||||
// Make the appropriate
|
// Make the appropriate
|
||||||
points[numlines*2]=start;
|
currentdata=&(linedata[numlines]);
|
||||||
points[(numlines*2)+1]=end;
|
currentdata->pt1=start;
|
||||||
|
currentdata->pt2=end;
|
||||||
|
|
||||||
// Top side uses the same color order as the left one
|
// Top side uses the same color order as the right one
|
||||||
colors[numlines]=framecolors[rightindices[colorindex]];
|
currentdata->color=framecolors[rightindices[colorindex]].GetColor32();
|
||||||
colorindex+=step;
|
colorindex+=step;
|
||||||
numlines++;
|
numlines++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_driver->StrokeLineArray(points,numlines,&_drawdata,colors);
|
_driver->StrokeLineArray(numlines,linedata,&_drawdata);
|
||||||
|
|
||||||
delete rightindices;
|
delete [] rightindices;
|
||||||
delete leftindices;
|
delete [] leftindices;
|
||||||
|
|
||||||
// Draw the resize thumb if we're supposed to
|
// Draw the resize thumb if we're supposed to
|
||||||
if(!(_flags & B_NOT_RESIZABLE))
|
if(!(_flags & B_NOT_RESIZABLE))
|
||||||
|
|||||||
Reference in New Issue
Block a user