Add tests for Fill/Stroke Triangle and Polygon
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2825 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2d350d3dba
commit
163b5adda5
@ -97,7 +97,7 @@ void RootLayer::RequestDraw(void)
|
||||
int8 pattern[8];
|
||||
int8 pattern2[8];
|
||||
memset(pattern,255,8);
|
||||
memset(pattern2,128+32+8+2,8);
|
||||
memset(pattern2,128+64+32+16,8);
|
||||
BRect r1(100,100,1500,1100);
|
||||
BPoint pts[4];
|
||||
pts[0].x = 200;
|
||||
@ -108,6 +108,28 @@ void RootLayer::RequestDraw(void)
|
||||
pts[2].y = 400;
|
||||
pts[3].x = 1200;
|
||||
pts[3].y = 800;
|
||||
BPoint triangle[3];
|
||||
BRect triangleRect(100,100,400,300);
|
||||
triangle[0].x = 100;
|
||||
triangle[0].y = 100;
|
||||
triangle[1].x = 100;
|
||||
triangle[1].y = 300;
|
||||
triangle[2].x = 400;
|
||||
triangle[2].y = 300;
|
||||
BPoint polygon[6];
|
||||
BRect polygonRect(100,100,300,400);
|
||||
polygon[0].x = 100;
|
||||
polygon[0].y = 100;
|
||||
polygon[1].x = 100;
|
||||
polygon[1].y = 400;
|
||||
polygon[2].x = 200;
|
||||
polygon[2].y = 300;
|
||||
polygon[3].x = 300;
|
||||
polygon[3].y = 400;
|
||||
polygon[4].x = 300;
|
||||
polygon[4].y = 100;
|
||||
polygon[5].x = 200;
|
||||
polygon[5].y = 200;
|
||||
|
||||
_layerdata->highcolor.SetColor(255,0,0,255);
|
||||
_layerdata->lowcolor.SetColor(255,255,255,255);
|
||||
@ -122,10 +144,15 @@ void RootLayer::RequestDraw(void)
|
||||
_driver->StrokeEllipse(BRect(200,700,400,900),_layerdata,pattern);
|
||||
_driver->StrokeRect(BRect(650,1000,750,1090),_layerdata,pattern);
|
||||
_driver->StrokeRoundRect(BRect(200,1000,600,1090),30,40,_layerdata,pattern);
|
||||
// _driver->StrokePolygon(polygon,6,polygonRect,_layerdata,pattern);
|
||||
// _driver->StrokeTriangle(triangle,triangleRect,_layerdata,pattern);
|
||||
_layerdata->highcolor.SetColor(255,0,255,255);
|
||||
_driver->FillArc(BRect(1250,300,1450,600),30,270,_layerdata,pattern);
|
||||
// _driver->FillBezier(pts,_layerdata,pattern);
|
||||
_driver->FillEllipse(BRect(800,300,1200,600),_layerdata,pattern);
|
||||
_driver->FillRoundRect(BRect(800,1000,1200,1090),30,40,_layerdata,pattern2);
|
||||
_driver->FillPolygon(polygon,6,polygonRect,_layerdata,pattern);
|
||||
// _driver->FillTriangle(triangle,triangleRect,_layerdata,pattern);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user