Hi!To test the BPicture flattening / unflattening under Haiku I wrote the FlattenPictureTest application.
Screenshot: http://dev.haiku-os.org/attachment/ticket/1381/PictureTests.png What you can see in the screenshot is the result of running the tests. Each item shows the result of a test. In the first column is the recorded picture drawn into a bitmap, next the flattened and then unflattened picture is drawn into another bitmap, next the test name is shown, and finally if there is a test failure and error message is shown. The item background color also indicates the success/failure of a test.The source code is in the Haiku repository in directory src/tests/ kits/interface/flatten_picture.
Running the application already revealed a number of bugs that I have added to trac:
http://dev.haiku-os.org/ticket/1380 http://dev.haiku-os.org/ticket/1381 http://dev.haiku-os.org/ticket/1382I want to invite interested people to add more tests to the application, which is quite easy. You have to implement a function and add it to an array in file PictureTestCases.cpp (1).
For example the implementation of the test "Test Vertical Line" is: void testVerticalLine(BView *view, BRect frame) {view->StrokeLine(BPoint(frame.left, frame.top), BPoint (frame.right, frame.bottom));
} - Michael 1)http://svn.berlios.de/viewcvs/haiku/haiku/trunk/src/tests/kits/ interface/flatten_picture/PictureTestCases.cpp?rev=21888&view=markup