From 15cf50e01033a42ff051e58337c7d6f4b702c2b4 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 4 Sep 2008 09:30:29 +0000 Subject: [PATCH] Added a test (not that cool) for SetDrawingMode(). For some reasons it fails, although the images look the same to me. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27316 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../interface/flatten_picture/PictureTestCases.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/tests/kits/interface/flatten_picture/PictureTestCases.cpp b/src/tests/kits/interface/flatten_picture/PictureTestCases.cpp index 92fe43a3c7..866776b78f 100644 --- a/src/tests/kits/interface/flatten_picture/PictureTestCases.cpp +++ b/src/tests/kits/interface/flatten_picture/PictureTestCases.cpp @@ -682,8 +682,19 @@ static void testSetFontSize(BView *view, BRect frame) view->DrawString("Haiku"); } +static void testSetDrawingMode(BView *view, BRect frame) +{ + view->StrokeLine(frame.LeftTop(), frame.RightBottom()); + view->StrokeLine(frame.LeftBottom(), frame.RightTop()); + view->SetDrawingMode(B_OP_ALPHA); + rgb_color color = kRed; + color.alpha = 127; + view->SetHighColor(color); + view->FillRect(frame, B_SOLID_HIGH); +} + + // TODO -// - drawing mode // - blending mode // - line mode // - push/pop state @@ -745,6 +756,7 @@ TestCase gTestCases[] = { { "Test SetOriginAndScale4", testSetOriginAndScale4 }, { "Test SetOriginAndScale5", testSetOriginAndScale5 }, { "Test SetFontSize", testSetFontSize }, + { "Test SetDrawingMode", testSetDrawingMode }, { NULL, NULL } };