summaryrefslogtreecommitdiff
path: root/basebmp/test
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2011-11-04 10:30:56 +0100
committerThorsten Behrens <tbehrens@suse.com>2011-11-04 10:40:08 +0100
commita6a391da8d6e3aa2b9f30c9f8b664014dc2ae02c (patch)
treeaab357789436339cc6f65910822aa2ec7597a206 /basebmp/test
parent504b384dd1c74838f34d5caa27f3e916bb309a8c (diff)
Put BitmapDevice::getPixelData() back.
Slight tweak of d0d62edf3f398e9ddb2fd0f1f5fbe1dd0393ff47 - getPixel() and getPixelData() are complementary functions, similar in spirit to const and non-const getters. Added unit test for it to avoid flagging it for removal again.
Diffstat (limited to 'basebmp/test')
-rw-r--r--basebmp/test/basictest.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx
index 63292729d419..2f262e5bbb0f 100644
--- a/basebmp/test/basictest.cxx
+++ b/basebmp/test/basictest.cxx
@@ -140,10 +140,15 @@ public:
Format::ONE_BIT_MSB_PAL ));
const basegfx::B2IPoint aPt(3,3);
+ CPPUNIT_ASSERT_MESSAGE("getPixelData for virgin device",
+ pDevice->getPixelData(aPt) == 0);
+
const Color aCol(0xFFFFFFFF);
pDevice->setPixel( aPt, aCol, DrawMode_PAINT );
CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #1",
pDevice->getPixel(aPt) == aCol);
+ CPPUNIT_ASSERT_MESSAGE("getPixelData for white pixel",
+ pDevice->getPixelData(aPt) == 1);
const basegfx::B2IPoint aPt2(0,0);
const Color aCol2(0xFFFFFFFF);