From 6928d01f7a4cff47b6c6b186885ac79a58e64ac6 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Fri, 30 Jun 2006 10:05:21 +0000 Subject: #i65904# Fixed ugly typos in clippedLine clipping; improved docs; added testcases for fixed bugs; corrected clip bounds for line and polyline rendering --- basebmp/test/basictest.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'basebmp/test/basictest.cxx') diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx index 893fdae489d9..8126dfd18f99 100644 --- a/basebmp/test/basictest.cxx +++ b/basebmp/test/basictest.cxx @@ -4,9 +4,9 @@ * * $RCSfile: basictest.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: thb $ $Date: 2006-06-28 16:50:19 $ + * last change: $Author: thb $ $Date: 2006-06-30 11:05:21 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -119,7 +119,7 @@ public: void testPixelFuncs() { // 1bpp - const basegfx::B2ISize aSize(101,101); + const basegfx::B2ISize aSize(64,64); BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize, true, Format::ONE_BIT_MSB_PAL )); @@ -142,11 +142,21 @@ public: CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #3", pDevice->getPixel(aPt3) == aCol3); + pDevice->setPixel( aPt3, aCol2, DrawMode_PAINT ); + CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #3.5", + pDevice->getPixel(aPt3) == aCol2); + const basegfx::B2IPoint aPt4(-100000,-100000); pDevice->setPixel( aPt4, aCol3, DrawMode_PAINT ); const basegfx::B2IPoint aPt5(100000,100000); pDevice->setPixel( aPt5, aCol3, DrawMode_PAINT ); + sal_Int32 nPixel(countPixel(pDevice, aCol2)); + const basegfx::B2IPoint aPt6(aSize.getX(),aSize.getY()); + pDevice->setPixel( aPt6, aCol2, DrawMode_PAINT ); + CPPUNIT_ASSERT_MESSAGE("setPixel clipping", + countPixel(pDevice, aCol2) == nPixel); + // 8bit alpha { pDevice = createBitmapDevice( aSize, -- cgit v1.2.3