Update to match overhaul of DisplayDriver API

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6337 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-01-27 00:41:45 +00:00
parent f9de45c608
commit a3365dd184
3 changed files with 101 additions and 105 deletions
@@ -424,18 +424,16 @@ void BeDecorator::_DrawTab(BRect r)
if(_look == B_NO_BORDER_WINDOW_LOOK || _look == B_BORDERED_WINDOW_LOOK) if(_look == B_NO_BORDER_WINDOW_LOOK || _look == B_BORDERED_WINDOW_LOOK)
return; return;
_layerdata.highcolor=(GetFocus())?_colors->window_tab:_colors->inactive_window_tab; _driver->FillRect(_tabrect,(GetFocus())?_colors->window_tab:_colors->inactive_window_tab);
_driver->FillRect(_tabrect,_layerdata.highcolor);
_layerdata.highcolor=framecolors[2]; _driver->StrokeLine(_tabrect.LeftTop(),_tabrect.LeftBottom(),framecolors[2]);
_driver->StrokeLine(_tabrect.LeftTop(),_tabrect.LeftBottom(),_layerdata.pensize,_layerdata.highcolor); _driver->StrokeLine(_tabrect.LeftTop(),_tabrect.RightTop(),framecolors[2]);
_driver->StrokeLine(_tabrect.LeftTop(),_tabrect.RightTop(),_layerdata.pensize,_layerdata.highcolor);
_layerdata.highcolor=framecolors[4]; _driver->StrokeLine(_tabrect.RightTop(),_tabrect.RightBottom(),framecolors[4]);
_driver->StrokeLine(_tabrect.RightTop(),_tabrect.RightBottom(),_layerdata.pensize,_layerdata.highcolor);
_layerdata.highcolor=framecolors[1];
_driver->StrokeLine( BPoint( _tabrect.left + 2, _tabrect.bottom ), _driver->StrokeLine( BPoint( _tabrect.left + 2, _tabrect.bottom ),
BPoint( _tabrect.right - 2, _tabrect.bottom ), BPoint( _tabrect.right - 2, _tabrect.bottom ),
_layerdata.pensize,_layerdata.highcolor); framecolors[1]);
_DrawTitle(_tabrect); _DrawTitle(_tabrect);
@@ -459,7 +457,8 @@ void BeDecorator::DrawBlendedRect(BRect r, bool down)
// Actually just draws a blended square // Actually just draws a blended square
int32 w=r.IntegerWidth(), h=r.IntegerHeight(); int32 w=r.IntegerWidth(), h=r.IntegerHeight();
RGBColor temprgbcol;
rgb_color tmpcol,halfcol, startcol, endcol; rgb_color tmpcol,halfcol, startcol, endcol;
float rstep,gstep,bstep,i; float rstep,gstep,bstep,i;
@@ -484,27 +483,24 @@ void BeDecorator::DrawBlendedRect(BRect r, bool down)
for(i=0;i<=steps; i++) for(i=0;i<=steps; i++)
{ {
SetRGBColor(&tmpcol, uint8(startcol.red-(i*rstep)), temprgbcol.SetColor(uint8(startcol.red-(i*rstep)),
uint8(startcol.green-(i*gstep)), uint8(startcol.green-(i*gstep)),
uint8(startcol.blue-(i*bstep))); uint8(startcol.blue-(i*bstep)));
_layerdata.highcolor=tmpcol;
_driver->StrokeLine(BPoint(r.left,r.top+i), _driver->StrokeLine(BPoint(r.left,r.top+i),
BPoint(r.left+i,r.top),1.0,_layerdata.highcolor); BPoint(r.left+i,r.top),temprgbcol);
SetRGBColor(&tmpcol, uint8(halfcol.red-(i*rstep)), temprgbcol.SetColor(uint8(halfcol.red-(i*rstep)),
uint8(halfcol.green-(i*gstep)), uint8(halfcol.green-(i*gstep)),
uint8(halfcol.blue-(i*bstep))); uint8(halfcol.blue-(i*bstep)));
_layerdata.highcolor=tmpcol;
_driver->StrokeLine(BPoint(r.left+steps,r.top+i), _driver->StrokeLine(BPoint(r.left+steps,r.top+i),
BPoint(r.left+i,r.top+steps),1.0,_layerdata.highcolor); BPoint(r.left+i,r.top+steps),temprgbcol);
} }
// _layerdata.highcolor=startcol; // _layerdata.highcolor=startcol;
// _driver->FillRect(r,&_layerdata,pat_solidhigh); // _driver->FillRect(r,&_layerdata,pat_solidhigh);
_driver->StrokeRect(r,1.0,framecolors[3]); _driver->StrokeRect(r,framecolors[3]);
} }
void BeDecorator::_DrawFrame(BRect invalid) void BeDecorator::_DrawFrame(BRect invalid)
@@ -784,7 +780,7 @@ void BeDecorator::_DrawFrame(BRect invalid)
} }
} }
_driver->StrokeLineArray(points,numlines,1.0,colors); _driver->StrokeLineArray(points,numlines,&_layerdata,colors);
delete rightindices; delete rightindices;
delete leftindices; delete leftindices;
@@ -802,12 +798,12 @@ void BeDecorator::_DrawFrame(BRect invalid)
r.right-=4; r.right-=4;
r.bottom-=4; r.bottom-=4;
_driver->StrokeLine(r.LeftTop(),r.RightTop(),1.0,framecolors[2]); _driver->StrokeLine(r.LeftTop(),r.RightTop(),framecolors[2]);
_driver->StrokeLine(r.LeftTop(),r.LeftBottom(),1.0,framecolors[2]); _driver->StrokeLine(r.LeftTop(),r.LeftBottom(),framecolors[2]);
r.OffsetBy(1,1); r.OffsetBy(1,1);
_driver->StrokeLine(r.LeftTop(),r.RightTop(),1.0,framecolors[0]); _driver->StrokeLine(r.LeftTop(),r.RightTop(),framecolors[0]);
_driver->StrokeLine(r.LeftTop(),r.LeftBottom(),1.0,framecolors[0]); _driver->StrokeLine(r.LeftTop(),r.LeftBottom(),framecolors[0]);
r.OffsetBy(1,1); r.OffsetBy(1,1);
_driver->FillRect(r,framecolors[1]); _driver->FillRect(r,framecolors[1]);
@@ -846,13 +842,13 @@ void BeDecorator::_DrawFrame(BRect invalid)
uint8(startcol.blue-(i*bstep))); uint8(startcol.blue-(i*bstep)));
_driver->StrokeLine(BPoint(r.left,r.top+i), _driver->StrokeLine(BPoint(r.left,r.top+i),
BPoint(r.left+i,r.top),1.0,_layerdata.highcolor); BPoint(r.left+i,r.top),_layerdata.highcolor);
_layerdata.highcolor.SetColor(uint8(halfcol.red-(i*rstep)), _layerdata.highcolor.SetColor(uint8(halfcol.red-(i*rstep)),
uint8(halfcol.green-(i*gstep)), uint8(halfcol.green-(i*gstep)),
uint8(halfcol.blue-(i*bstep))); uint8(halfcol.blue-(i*bstep)));
_driver->StrokeLine(BPoint(r.left+steps,r.top+i), _driver->StrokeLine(BPoint(r.left+steps,r.top+i),
BPoint(r.left+i,r.top+steps),1.0,_layerdata.highcolor); BPoint(r.left+i,r.top+steps),_layerdata.highcolor);
} }
_driver->Unlock(); _driver->Unlock();
// _layerdata.highcolor=framecolors[4]; // _layerdata.highcolor=framecolors[4];
@@ -862,9 +858,9 @@ void BeDecorator::_DrawFrame(BRect invalid)
{ {
_layerdata.highcolor=framecolors[4]; _layerdata.highcolor=framecolors[4];
_driver->StrokeLine(BPoint(r.right,r.top),BPoint(r.right-3,r.top), _driver->StrokeLine(BPoint(r.right,r.top),BPoint(r.right-3,r.top),
1.0,_layerdata.highcolor); _layerdata.highcolor);
_driver->StrokeLine(BPoint(r.left,r.bottom),BPoint(r.left,r.bottom-3), _driver->StrokeLine(BPoint(r.left,r.bottom),BPoint(r.left,r.bottom-3),
1.0,_layerdata.highcolor); _layerdata.highcolor);
} }
} }
} }
@@ -230,25 +230,25 @@ void MacDecorator::_DrawZoom(BRect r)
pt2.x--; pt2.x--;
_layerdata.highcolor.SetColor(136,136,136); _layerdata.highcolor.SetColor(136,136,136);
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt2=r.LeftBottom(); pt2=r.LeftBottom();
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt=r.RightBottom(); pt=r.RightBottom();
pt2=r.RightTop(); pt2=r.RightTop();
pt2.y++; pt2.y++;
_layerdata.highcolor.SetColor(255,255,255); _layerdata.highcolor.SetColor(255,255,255);
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt2=r.LeftBottom(); pt2=r.LeftBottom();
pt2.x++; pt2.x++;
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
rect.InsetBy(1,1); rect.InsetBy(1,1);
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeRect(rect,1.0,_layerdata.highcolor); _driver->StrokeRect(rect,_layerdata.highcolor);
rect.InsetBy(1,1); rect.InsetBy(1,1);
DrawBlendedRect(rect,down); DrawBlendedRect(rect,down);
@@ -260,7 +260,7 @@ void MacDecorator::_DrawZoom(BRect r)
rect.right++; rect.right++;
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,_layerdata.highcolor); _driver->StrokeLine(rect.LeftTop(),rect.RightTop(),_layerdata.highcolor);
} }
void MacDecorator::_DrawClose(BRect r) void MacDecorator::_DrawClose(BRect r)
@@ -274,25 +274,25 @@ void MacDecorator::_DrawClose(BRect r)
pt2.x--; pt2.x--;
_layerdata.highcolor.SetColor(136,136,136); _layerdata.highcolor.SetColor(136,136,136);
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt2=r.LeftBottom(); pt2=r.LeftBottom();
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt=r.RightBottom(); pt=r.RightBottom();
pt2=r.RightTop(); pt2=r.RightTop();
pt2.y++; pt2.y++;
_layerdata.highcolor.SetColor(255,255,255); _layerdata.highcolor.SetColor(255,255,255);
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt2=r.LeftBottom(); pt2=r.LeftBottom();
pt2.x++; pt2.x++;
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
rect.InsetBy(1,1); rect.InsetBy(1,1);
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeRect(rect,1.0,_layerdata.highcolor); _driver->StrokeRect(rect,_layerdata.highcolor);
rect.InsetBy(1,1); rect.InsetBy(1,1);
DrawBlendedRect(rect,down); DrawBlendedRect(rect,down);
@@ -318,25 +318,25 @@ void MacDecorator::_DrawMinimize(BRect r)
pt2.x--; pt2.x--;
_layerdata.highcolor.SetColor(136,136,136); _layerdata.highcolor.SetColor(136,136,136);
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt2=r.LeftBottom(); pt2=r.LeftBottom();
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt=r.RightBottom(); pt=r.RightBottom();
pt2=r.RightTop(); pt2=r.RightTop();
pt2.y++; pt2.y++;
_layerdata.highcolor.SetColor(255,255,255); _layerdata.highcolor.SetColor(255,255,255);
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt2=r.LeftBottom(); pt2=r.LeftBottom();
pt2.x++; pt2.x++;
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
rect.InsetBy(1,1); rect.InsetBy(1,1);
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeRect(rect,1.0,_layerdata.highcolor); _driver->StrokeRect(rect,_layerdata.highcolor);
rect.InsetBy(1,1); rect.InsetBy(1,1);
DrawBlendedRect(rect,down); DrawBlendedRect(rect,down);
@@ -348,7 +348,7 @@ void MacDecorator::_DrawMinimize(BRect r)
rect.InsetBy(-2,0); rect.InsetBy(-2,0);
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeRect(rect,1.0,_layerdata.highcolor); _driver->StrokeRect(rect,_layerdata.highcolor);
} }
void MacDecorator::_DrawTab(BRect r) void MacDecorator::_DrawTab(BRect r)
@@ -359,7 +359,7 @@ void MacDecorator::_DrawTab(BRect r)
return; return;
// _layerdata.highcolor=frame_lowcol; // _layerdata.highcolor=frame_lowcol;
// _driver->StrokeRect(_tabrect,1.0,_layerdata.highcolor); // _driver->StrokeRect(_tabrect,_layerdata.highcolor);
// UpdateTitle(layer->name->String()); // UpdateTitle(layer->name->String());
BRect rect(_tabrect); BRect rect(_tabrect);
@@ -369,16 +369,16 @@ void MacDecorator::_DrawTab(BRect r)
if(GetFocus()) if(GetFocus())
{ {
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,frame_lowercol); _driver->StrokeLine(rect.LeftTop(),rect.RightTop(),frame_lowercol);
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,frame_lowercol); _driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),frame_lowercol);
_driver->StrokeLine(rect.RightBottom(),rect.RightTop(),1.0,frame_lowercol); _driver->StrokeLine(rect.RightBottom(),rect.RightTop(),frame_lowercol);
rect.InsetBy(1,1); rect.InsetBy(1,1);
rect.bottom++; rect.bottom++;
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,frame_highcol); _driver->StrokeLine(rect.LeftTop(),rect.RightTop(),frame_highcol);
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,frame_highcol); _driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),frame_highcol);
_driver->StrokeLine(rect.RightBottom(),rect.RightTop(),1.0,frame_lowcol); _driver->StrokeLine(rect.RightBottom(),rect.RightTop(),frame_lowcol);
// Draw the neat little lines on either side of the title if there's room // Draw the neat little lines on either side of the title if there's room
if((_tabrect.left+textoffset)>(_closerect.right+5)) if((_tabrect.left+textoffset)>(_closerect.right+5))
@@ -390,7 +390,7 @@ void MacDecorator::_DrawTab(BRect r)
_layerdata.highcolor.SetColor(frame_highcol); _layerdata.highcolor.SetColor(frame_highcol);
for(int32 i=0;i<6;i++) for(int32 i=0;i<6;i++)
{ {
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt.y+=2; pt.y+=2;
pt2.y+=2; pt2.y+=2;
} }
@@ -400,7 +400,7 @@ void MacDecorator::_DrawTab(BRect r)
_layerdata.highcolor.SetColor(frame_lowcol); _layerdata.highcolor.SetColor(frame_lowcol);
for(int32 i=0;i<6;i++) for(int32 i=0;i<6;i++)
{ {
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt.y+=2; pt.y+=2;
pt2.y+=2; pt2.y+=2;
} }
@@ -414,7 +414,7 @@ void MacDecorator::_DrawTab(BRect r)
_layerdata.highcolor.SetColor(frame_highcol); _layerdata.highcolor.SetColor(frame_highcol);
for(int32 i=0;i<6;i++) for(int32 i=0;i<6;i++)
{ {
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt.y+=2; pt.y+=2;
pt2.y+=2; pt2.y+=2;
} }
@@ -423,7 +423,7 @@ void MacDecorator::_DrawTab(BRect r)
_layerdata.highcolor.SetColor(frame_lowcol); _layerdata.highcolor.SetColor(frame_lowcol);
for(int32 i=0;i<6;i++) for(int32 i=0;i<6;i++)
{ {
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor); _driver->StrokeLine(pt,pt2,_layerdata.highcolor);
pt.y+=2; pt.y+=2;
pt2.y+=2; pt2.y+=2;
} }
@@ -480,7 +480,7 @@ void MacDecorator::DrawBlendedRect(BRect r, bool down)
_layerdata.highcolor=tmpcol; _layerdata.highcolor=tmpcol;
_driver->StrokeLine(BPoint(rect.left,rect.top+i), _driver->StrokeLine(BPoint(rect.left,rect.top+i),
BPoint(rect.left+i,rect.top),1.0,_layerdata.highcolor); BPoint(rect.left+i,rect.top),_layerdata.highcolor);
SetRGBColor(&tmpcol, uint8(halfcol.red-(i*rstep)), SetRGBColor(&tmpcol, uint8(halfcol.red-(i*rstep)),
uint8(halfcol.green-(i*gstep)), uint8(halfcol.green-(i*gstep)),
@@ -488,7 +488,7 @@ void MacDecorator::DrawBlendedRect(BRect r, bool down)
_layerdata.highcolor=tmpcol; _layerdata.highcolor=tmpcol;
_driver->StrokeLine(BPoint(rect.left+steps,rect.top+i), _driver->StrokeLine(BPoint(rect.left+steps,rect.top+i),
BPoint(rect.left+i,rect.top+steps),1.0,_layerdata.highcolor); BPoint(rect.left+i,rect.top+steps),_layerdata.highcolor);
} }
} }
@@ -511,68 +511,68 @@ void MacDecorator::_DrawFrame(BRect rect)
pt2=r.LeftBottom(); pt2=r.LeftBottom();
// Draw the left side of the frame // Draw the left side of the frame
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol); _driver->StrokeLine(pt,pt2,frame_lowercol);
pt.x++; pt.x++;
pt2.x++; pt2.x++;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_highcol); _driver->StrokeLine(pt,pt2,frame_highcol);
pt.x++; pt.x++;
pt2.x++; pt2.x++;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_midcol); _driver->StrokeLine(pt,pt2,frame_midcol);
pt.x++; pt.x++;
pt2.x++; pt2.x++;
_driver->StrokeLine(pt,pt2,1.0,frame_midcol); _driver->StrokeLine(pt,pt2,frame_midcol);
pt.x++; pt.x++;
pt2.x++; pt2.x++;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_lowcol); _driver->StrokeLine(pt,pt2,frame_lowcol);
pt.x++; pt.x++;
pt.y+=2; pt.y+=2;
topleftpt=pt; topleftpt=pt;
pt2.x++; pt2.x++;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol); _driver->StrokeLine(pt,pt2,frame_lowercol);
pt=r.RightTop(); pt=r.RightTop();
pt2=r.RightBottom(); pt2=r.RightBottom();
// Draw the right side of the frame // Draw the right side of the frame
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol); _driver->StrokeLine(pt,pt2,frame_lowercol);
pt.x--; pt.x--;
pt2.x--; pt2.x--;
_driver->StrokeLine(pt,pt2,1.0,frame_lowcol); _driver->StrokeLine(pt,pt2,frame_lowcol);
pt.x--; pt.x--;
pt2.x--; pt2.x--;
_driver->StrokeLine(pt,pt2,1.0,frame_midcol); _driver->StrokeLine(pt,pt2,frame_midcol);
pt.x--; pt.x--;
pt2.x--; pt2.x--;
_driver->StrokeLine(pt,pt2,1.0,frame_midcol); _driver->StrokeLine(pt,pt2,frame_midcol);
pt.x--; pt.x--;
pt2.x--; pt2.x--;
_driver->StrokeLine(pt,pt2,1.0,frame_highcol); _driver->StrokeLine(pt,pt2,frame_highcol);
pt.x--; pt.x--;
pt.y+=2; pt.y+=2;
toprightpt=pt; toprightpt=pt;
pt2.x--; pt2.x--;
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol); _driver->StrokeLine(pt,pt2,frame_lowercol);
// Draw the top side of the frame that is not in the tab // Draw the top side of the frame that is not in the tab
_driver->StrokeLine(topleftpt,toprightpt,1.0,frame_lowercol); _driver->StrokeLine(topleftpt,toprightpt,frame_lowercol);
topleftpt.y--; topleftpt.y--;
toprightpt.x++; toprightpt.x++;
toprightpt.y--; toprightpt.y--;
_driver->StrokeLine(topleftpt,toprightpt,1.0,frame_lowcol); _driver->StrokeLine(topleftpt,toprightpt,frame_lowcol);
pt=r.RightTop(); pt=r.RightTop();
pt2=r.RightBottom(); pt2=r.RightBottom();
@@ -582,37 +582,37 @@ void MacDecorator::_DrawFrame(BRect rect)
pt2=r.RightBottom(); pt2=r.RightBottom();
// Draw the bottom side of the frame // Draw the bottom side of the frame
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol); _driver->StrokeLine(pt,pt2,frame_lowercol);
pt.x++; pt.x++;
pt.y--; pt.y--;
pt2.x--; pt2.x--;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_lowcol); _driver->StrokeLine(pt,pt2,frame_lowcol);
pt.x++; pt.x++;
pt.y--; pt.y--;
pt2.x--; pt2.x--;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_midcol); _driver->StrokeLine(pt,pt2,frame_midcol);
pt.x++; pt.x++;
pt.y--; pt.y--;
pt2.x--; pt2.x--;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_midcol); _driver->StrokeLine(pt,pt2,frame_midcol);
pt.x++; pt.x++;
pt.y--; pt.y--;
pt2.x--; pt2.x--;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_highcol); _driver->StrokeLine(pt,pt2,frame_highcol);
pt.x+=2; pt.x+=2;
pt.y--; pt.y--;
pt2.x--; pt2.x--;
pt2.y--; pt2.y--;
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol); _driver->StrokeLine(pt,pt2,frame_lowercol);
pt.y--; pt.y--;
pt2.x--; pt2.x--;
pt2.y--; pt2.y--;
@@ -228,9 +228,9 @@ void WinDecorator::_DrawZoom(BRect r)
rect.OffsetBy(1,1); rect.OffsetBy(1,1);
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeRect(rect,1.0,_layerdata.highcolor); _driver->StrokeRect(rect,_layerdata.highcolor);
rect.InsetBy(1,1); rect.InsetBy(1,1);
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,_layerdata.highcolor); _driver->StrokeLine(rect.LeftTop(),rect.RightTop(),_layerdata.highcolor);
} }
@@ -250,11 +250,11 @@ void WinDecorator::_DrawClose(BRect r)
rect.OffsetBy(1,1); rect.OffsetBy(1,1);
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),1.0,_layerdata.highcolor); _driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),_layerdata.highcolor);
_driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),1.0,_layerdata.highcolor); _driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),_layerdata.highcolor);
rect.OffsetBy(1,0); rect.OffsetBy(1,0);
_driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),1.0,_layerdata.highcolor); _driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),_layerdata.highcolor);
_driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),1.0,_layerdata.highcolor); _driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),_layerdata.highcolor);
} }
void WinDecorator::_DrawMinimize(BRect r) void WinDecorator::_DrawMinimize(BRect r)
@@ -268,7 +268,7 @@ void WinDecorator::_DrawMinimize(BRect r)
rect.OffsetBy(1,1); rect.OffsetBy(1,1);
_layerdata.highcolor.SetColor(0,0,0); _layerdata.highcolor.SetColor(0,0,0);
_driver->StrokeRect(rect,1.0,_layerdata.highcolor); _driver->StrokeRect(rect,_layerdata.highcolor);
} }
void WinDecorator::_DrawTab(BRect r) void WinDecorator::_DrawTab(BRect r)
@@ -278,7 +278,7 @@ void WinDecorator::_DrawTab(BRect r)
if(_look==B_NO_BORDER_WINDOW_LOOK) if(_look==B_NO_BORDER_WINDOW_LOOK)
return; return;
// _driver->StrokeRect(_tabrect,1.0,frame_lowcol); // _driver->StrokeRect(_tabrect,frame_lowcol);
// UpdateTitle(layer->name->String()); // UpdateTitle(layer->name->String());
@@ -317,38 +317,38 @@ void WinDecorator::DrawBeveledRect(BRect r, bool down)
// Top highlight // Top highlight
_layerdata.highcolor=higher; _layerdata.highcolor=higher;
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,higher); _driver->StrokeLine(rect.LeftTop(),rect.RightTop(),higher);
// Left highlight // Left highlight
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,higher); _driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),higher);
// Right shading // Right shading
pt=rect.RightTop(); pt=rect.RightTop();
pt.y++; pt.y++;
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower); _driver->StrokeLine(pt,rect.RightBottom(),lower);
// Bottom shading // Bottom shading
pt=rect.LeftBottom(); pt=rect.LeftBottom();
pt.x++; pt.x++;
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower); _driver->StrokeLine(pt,rect.RightBottom(),lower);
rect.InsetBy(1,1); rect.InsetBy(1,1);
// Top inside highlight // Top inside highlight
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,higher); _driver->StrokeLine(rect.LeftTop(),rect.RightTop(),higher);
// Left inside highlight // Left inside highlight
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,higher); _driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),higher);
// Right inside shading // Right inside shading
pt=rect.RightTop(); pt=rect.RightTop();
pt.y++; pt.y++;
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower); _driver->StrokeLine(pt,rect.RightBottom(),lower);
// Bottom inside shading // Bottom inside shading
pt=rect.LeftBottom(); pt=rect.LeftBottom();
pt.x++; pt.x++;
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower); _driver->StrokeLine(pt,rect.RightBottom(),lower);
rect.InsetBy(1,1); rect.InsetBy(1,1);
@@ -368,35 +368,35 @@ void WinDecorator::_DrawFrame(BRect rect)
BRect r=_borderrect; BRect r=_borderrect;
_layerdata.highcolor.SetColor(255,0,0); _layerdata.highcolor.SetColor(255,0,0);
_driver->StrokeRect(r,1.0,_layerdata.highcolor); _driver->StrokeRect(r,_layerdata.highcolor);
BPoint pt; BPoint pt;
pt=r.RightTop(); pt=r.RightTop();
pt.x--; pt.x--;
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_midcol); _driver->StrokeLine(r.LeftTop(),pt,frame_midcol);
pt=r.LeftBottom(); pt=r.LeftBottom();
pt.y--; pt.y--;
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_midcol); _driver->StrokeLine(r.LeftTop(),pt,frame_midcol);
_driver->StrokeLine(r.RightTop(),r.RightBottom(),1.0,frame_lowercol); _driver->StrokeLine(r.RightTop(),r.RightBottom(),frame_lowercol);
_driver->StrokeLine(r.LeftBottom(),r.RightBottom(),1.0,frame_lowercol); _driver->StrokeLine(r.LeftBottom(),r.RightBottom(),frame_lowercol);
r.InsetBy(1,1); r.InsetBy(1,1);
pt=r.RightTop(); pt=r.RightTop();
pt.x--; pt.x--;
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_highcol); _driver->StrokeLine(r.LeftTop(),pt,frame_highcol);
pt=r.LeftBottom(); pt=r.LeftBottom();
pt.y--; pt.y--;
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_highcol); _driver->StrokeLine(r.LeftTop(),pt,frame_highcol);
_driver->StrokeLine(r.RightTop(),r.RightBottom(),1.0,frame_lowcol); _driver->StrokeLine(r.RightTop(),r.RightBottom(),frame_lowcol);
_driver->StrokeLine(r.LeftBottom(),r.RightBottom(),1.0,frame_lowcol); _driver->StrokeLine(r.LeftBottom(),r.RightBottom(),frame_lowcol);
r.InsetBy(1,1); r.InsetBy(1,1);
_driver->StrokeRect(r,1.0,frame_midcol); _driver->StrokeRect(r,frame_midcol);
r.InsetBy(1,1); r.InsetBy(1,1);
_driver->StrokeRect(r,1.0,frame_midcol); _driver->StrokeRect(r,frame_midcol);
} }
extern "C" float get_decorator_version(void) extern "C" float get_decorator_version(void)