Lines Matching refs:pDevice

88     BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,  in TEST_F()  local
91 ASSERT_TRUE( pDevice->getSize() == aSize2 ) << "right size"; in TEST_F()
92 ASSERT_TRUE( pDevice->isTopDown() == true ) << "Top down format"; in TEST_F()
93 ASSERT_TRUE( pDevice->getScanlineFormat() == Format::ONE_BIT_MSB_PAL ) << "Scanline format"; in TEST_F()
94 ASSERT_TRUE( pDevice->getScanlineStride() == (aSize2.getY() + 7)/8 ) << "Scanline len"; in TEST_F()
95 ASSERT_TRUE( pDevice->getPalette() != NULL ) << "Palette existence"; in TEST_F()
96 ASSERT_TRUE( (*pDevice->getPalette())[0] == Color(0) ) << "Palette entry 0 is black"; in TEST_F()
97 ASSERT_TRUE( (*pDevice->getPalette())[1] == Color(0xFFFFFFFF) ) << "Palette entry 1 is white"; in TEST_F()
104 BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize, in TEST_F() local
110 pDevice->setPixel( aPt, aCol, DrawMode_PAINT ); in TEST_F()
111 ASSERT_TRUE(pDevice->getPixel(aPt) == aCol) << "get/setPixel roundtrip #1"; in TEST_F()
115 pDevice->setPixel( aPt2, aCol2, DrawMode_PAINT ); in TEST_F()
116 ASSERT_TRUE(pDevice->getPixel(aPt2) == aCol2) << "get/setPixel roundtrip #2"; in TEST_F()
120 pDevice->setPixel( aPt3, aCol3, DrawMode_PAINT ); in TEST_F()
121 ASSERT_TRUE(pDevice->getPixel(aPt3) == aCol3) << "get/setPixel roundtrip #3"; in TEST_F()
123 pDevice->setPixel( aPt3, aCol2, DrawMode_PAINT ); in TEST_F()
124 ASSERT_TRUE(pDevice->getPixel(aPt3) == aCol2) << "get/setPixel roundtrip #3.5"; in TEST_F()
127 pDevice->setPixel( aPt4, aCol3, DrawMode_PAINT ); in TEST_F()
129 pDevice->setPixel( aPt5, aCol3, DrawMode_PAINT ); in TEST_F()
131 sal_Int32 nPixel(countPixel(pDevice, aCol2)); in TEST_F()
133 pDevice->setPixel( aPt6, aCol2, DrawMode_PAINT ); in TEST_F()
134 ASSERT_TRUE(countPixel(pDevice, aCol2) == nPixel) << "setPixel clipping"; in TEST_F()
136 ASSERT_TRUE(pDevice->getBuffer()[0] == 0x80) << "raw pixel value #1"; in TEST_F()
140 pDevice = createBitmapDevice( aSize, in TEST_F()
144 pDevice->setPixel( aPt2, aCol, DrawMode_PAINT ); in TEST_F()
145 ASSERT_TRUE(pDevice->getPixel(aPt2) == aCol) << "get/setPixel roundtrip #4"; in TEST_F()
148 pDevice->setPixel( aPt222, aCol, DrawMode_PAINT ); in TEST_F()
149 ASSERT_TRUE(pDevice->getPixel(aPt222) == aCol) << "get/setPixel roundtrip #5"; in TEST_F()
151 pDevice->setPixel( aPt3, aCol, DrawMode_PAINT ); in TEST_F()
152 ASSERT_TRUE(pDevice->getPixel(aPt3) == aCol) << "get/setPixel roundtrip #6"; in TEST_F()
154 ASSERT_TRUE(pDevice->getBuffer()[0] == 0x01) << "raw pixel value #2"; in TEST_F()
155 ASSERT_TRUE(pDevice->getBuffer()[8] == 0x02) << "raw pixel value #3"; in TEST_F()
160 pDevice = createBitmapDevice( aSize, in TEST_F()
165 pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); in TEST_F()
166 ASSERT_TRUE(pDevice->getPixel(aPt) == aCol4) << "get/setPixel roundtrip #4"; in TEST_F()
169 pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); in TEST_F()
170 ASSERT_TRUE(pDevice->getPixel(aPt2) == aCol5) << "get/setPixel roundtrip #5"; in TEST_F()
173 pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); in TEST_F()
174 ASSERT_TRUE(pDevice->getPixel(aPt3) == aCol6) << "get/setPixel roundtrip #6"; in TEST_F()
179 pDevice = createBitmapDevice( aSize, in TEST_F()
183 pDevice->clear( aCol7 ); in TEST_F()
186 pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); in TEST_F()
187 ASSERT_TRUE(pDevice->getPixel(aPt) == aCol4) << "get/setPixel roundtrip #7"; in TEST_F()
190 pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); in TEST_F()
191 ASSERT_TRUE(pDevice->getPixel(aPt2) != aCol7) << "get/setPixel roundtrip #8"; in TEST_F()
194 pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); in TEST_F()
195 ASSERT_TRUE(pDevice->getPixel(aPt3) == aCol6) << "get/setPixel roundtrip #9"; in TEST_F()
200 pDevice = createBitmapDevice( aSize, in TEST_F()
205 pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); in TEST_F()
206 ASSERT_TRUE(pDevice->getPixel(aPt) == aCol4) << "get/setPixel roundtrip #10"; in TEST_F()
209 pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); in TEST_F()
210 ASSERT_TRUE(pDevice->getPixel(aPt2) == aCol5) << "get/setPixel roundtrip #11"; in TEST_F()
213 pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); in TEST_F()
214 ASSERT_TRUE(pDevice->getPixel(aPt3) == aCol6) << "get/setPixel roundtrip #12"; in TEST_F()
216 ASSERT_TRUE(pDevice->getBuffer()[2] == 0x3F in TEST_F()
217 && pDevice->getBuffer()[1] == 0x2F in TEST_F()
218 && pDevice->getBuffer()[0] == 0x1F) << "raw pixel value #4"; in TEST_F()
223 pDevice = createBitmapDevice( aSize, in TEST_F()
228 pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); in TEST_F()
229 ASSERT_TRUE(pDevice->getPixel(aPt) == aCol4) << "get/setPixel roundtrip #13"; in TEST_F()
232 pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); in TEST_F()
233 ASSERT_TRUE(pDevice->getPixel(aPt2) == aCol5) << "get/setPixel roundtrip #14"; in TEST_F()
236 pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); in TEST_F()
237 ASSERT_TRUE(pDevice->getPixel(aPt3) == aCol6) << "get/setPixel roundtrip #15"; in TEST_F()