diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-02 08:47:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-04 08:30:24 +0200 |
commit | ab377324bb8fe081f1e01cd04f534bcf817fda28 (patch) | |
tree | 09f91678f910886f6c840f65007388e27d211f0c /basebmp | |
parent | 52e4ba4b98fdee1f0624e7195927725171984096 (diff) |
convert DrawMode to scoped enum
Change-Id: Ie4a7705cc3d042d08178e562a2c2ffaf0be3810f
Diffstat (limited to 'basebmp')
-rw-r--r-- | basebmp/source/bitmapdevice.cxx | 34 | ||||
-rw-r--r-- | basebmp/test/basictest.cxx | 44 | ||||
-rw-r--r-- | basebmp/test/bmpmasktest.cxx | 10 | ||||
-rw-r--r-- | basebmp/test/bmptest.cxx | 20 | ||||
-rw-r--r-- | basebmp/test/cliptest.cxx | 30 | ||||
-rw-r--r-- | basebmp/test/filltest.cxx | 26 | ||||
-rw-r--r-- | basebmp/test/linetest.cxx | 18 | ||||
-rw-r--r-- | basebmp/test/masktest.cxx | 4 | ||||
-rw-r--r-- | basebmp/test/polytest.cxx | 30 |
9 files changed, 108 insertions, 108 deletions
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index 500ef9da8541..5c98c5d85710 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -437,7 +437,7 @@ namespace const DestIterator pixel( maBegin + vigra::Diff2D(rPt.getX(), rPt.getY()) ); - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) maXorAccessor.set( pixelColor, pixel ); else @@ -461,7 +461,7 @@ namespace maBegin + offset, pMask->maBegin + offset ); - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) maMaskedXorAccessor.set( pixelColor, aIter ); else @@ -547,7 +547,7 @@ namespace const XorAcc& xorAcc, DrawMode drawMode ) { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implRenderLine( rPt1, rPt2, rBounds, col, begin, maAccessor, xorAcc ); else @@ -625,7 +625,7 @@ namespace Color lineColor, DrawMode drawMode ) SAL_OVERRIDE { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawPolygon( rPoly, rBounds, lineColor, maBegin, maRawXorAccessor ); @@ -641,7 +641,7 @@ namespace DrawMode drawMode, const BitmapDeviceSharedPtr& rClip ) SAL_OVERRIDE { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawPolygon( rPoly, rBounds, lineColor, getMaskedIter(rClip), maRawMaskedXorAccessor ); @@ -682,7 +682,7 @@ namespace DrawMode drawMode, const basegfx::B2IBox& rBounds ) SAL_OVERRIDE { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implFillPolyPolygon( rPoly, fillColor, maBegin, maRawXorAccessor, @@ -700,7 +700,7 @@ namespace const basegfx::B2IBox& rBounds, const BitmapDeviceSharedPtr& rClip ) SAL_OVERRIDE { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implFillPolyPolygon( rPoly, fillColor, getMaskedIter(rClip), maRawMaskedXorAccessor, @@ -810,7 +810,7 @@ namespace { if( isCompatibleBitmap( rSrcBitmap ) ) { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawBitmap(rSrcBitmap, rSrcRect, rDstRect, maBegin, maRawXorAccessor); @@ -825,7 +825,7 @@ namespace } else { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawBitmapGeneric(rSrcBitmap, rSrcRect, rDstRect, maBegin, maXorAccessor); @@ -845,7 +845,7 @@ namespace { if( isCompatibleBitmap( rSrcBitmap ) ) { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawBitmap(rSrcBitmap, rSrcRect, rDstRect, getMaskedIter(rClip), maRawMaskedXorAccessor); @@ -856,7 +856,7 @@ namespace } else { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawBitmapGeneric(rSrcBitmap, rSrcRect, rDstRect, getMaskedIter(rClip), maMaskedXorAccessor); @@ -1054,7 +1054,7 @@ namespace if( isCompatibleClipMask(rMask) && isCompatibleBitmap(rSrcBitmap) ) { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawMaskedBitmap(rSrcBitmap, rMask, rSrcRect, rDstRect, maBegin, @@ -1067,7 +1067,7 @@ namespace } else { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawMaskedBitmapGeneric(rSrcBitmap, rMask, rSrcRect, rDstRect, maBegin, @@ -1091,7 +1091,7 @@ namespace if( isCompatibleClipMask(rMask) && isCompatibleBitmap(rSrcBitmap) ) { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawMaskedBitmap(rSrcBitmap, rMask, rSrcRect, rDstRect, getMaskedIter(rClip), @@ -1104,7 +1104,7 @@ namespace } else { - if( drawMode == DrawMode_XOR ) + if( drawMode == DrawMode::XOR ) implDrawMaskedBitmapGeneric(rSrcBitmap, rMask, rSrcRect, rDstRect, getMaskedIter(rClip), @@ -1639,7 +1639,7 @@ void BitmapDevice::drawMaskedColor( Color aSrcColor, pAlphaCopy->drawBitmap(rAlphaMask, aSrcRange, aAlphaRange, - DrawMode_PAINT); + DrawMode::Paint); drawMaskedColor_i( aSrcColor, pAlphaCopy, aAlphaRange, aDestPoint ); } else @@ -1691,7 +1691,7 @@ void BitmapDevice::drawMaskedColor( Color aSrcColor, pAlphaCopy->drawBitmap(rAlphaMask, aSrcRange, aAlphaRange, - DrawMode_PAINT); + DrawMode::Paint); drawMaskedColor_i( aSrcColor, pAlphaCopy, aAlphaRange, aDestPoint, rClip ); } else diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx index 293fbe5d1c17..c74d632ba5cc 100644 --- a/basebmp/test/basictest.cxx +++ b/basebmp/test/basictest.cxx @@ -131,7 +131,7 @@ public: pDevice->getPixelData(aPt) == 0); const Color aCol(0xFFFFFFFF); - pDevice->setPixel( aPt, aCol, DrawMode_PAINT ); + pDevice->setPixel( aPt, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #1", pDevice->getPixel(aPt) == aCol); CPPUNIT_ASSERT_MESSAGE("getPixelData for white pixel", @@ -139,28 +139,28 @@ public: const basegfx::B2IPoint aPt2(0,0); const Color aCol2(0xFFFFFFFF); - pDevice->setPixel( aPt2, aCol2, DrawMode_PAINT ); + pDevice->setPixel( aPt2, aCol2, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #2", pDevice->getPixel(aPt2) == aCol2); const basegfx::B2IPoint aPt3(aSize.getX()-1,aSize.getY()-1); const Color aCol3(0x00000000); - pDevice->setPixel( aPt3, aCol3, DrawMode_PAINT ); + pDevice->setPixel( aPt3, aCol3, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #3", pDevice->getPixel(aPt3) == aCol3); - pDevice->setPixel( aPt3, aCol2, DrawMode_PAINT ); + 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 ); + pDevice->setPixel( aPt4, aCol3, DrawMode::Paint ); const basegfx::B2IPoint aPt5(100000,100000); - pDevice->setPixel( aPt5, aCol3, DrawMode_PAINT ); + 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 ); + pDevice->setPixel( aPt6, aCol2, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("setPixel clipping", countPixel(pDevice, aCol2) == nPixel); @@ -174,16 +174,16 @@ public: FORMAT_ONE_BIT_LSB_PAL, basebmp::getBitmapDeviceStrideForWidth(FORMAT_ONE_BIT_LSB_PAL, aSize.getX())); - pDevice->setPixel( aPt2, aCol, DrawMode_PAINT ); + pDevice->setPixel( aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #4", pDevice->getPixel(aPt2) == aCol); const basegfx::B2IPoint aPt222(1,1); - pDevice->setPixel( aPt222, aCol, DrawMode_PAINT ); + pDevice->setPixel( aPt222, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #5", pDevice->getPixel(aPt222) == aCol); - pDevice->setPixel( aPt3, aCol, DrawMode_PAINT ); + pDevice->setPixel( aPt3, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #6", pDevice->getPixel(aPt3) == aCol); @@ -201,17 +201,17 @@ public: basebmp::getBitmapDeviceStrideForWidth(FORMAT_EIGHT_BIT_GREY, aSize.getX())); const Color aCol4(0x010101); - pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); + pDevice->setPixel( aPt, aCol4, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #4", pDevice->getPixel(aPt) == aCol4); const Color aCol5(0x0F0F0F); - pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); + pDevice->setPixel( aPt2, aCol5, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #5", pDevice->getPixel(aPt2) == aCol5); const Color aCol6(0xFFFFFF); - pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); + pDevice->setPixel( aPt3, aCol6, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #6", pDevice->getPixel(aPt3) == aCol6); } @@ -226,17 +226,17 @@ public: pDevice->clear( aCol7 ); const Color aCol4(0x00101010); - pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); + pDevice->setPixel( aPt, aCol4, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #7", pDevice->getPixel(aPt) == aCol4); const Color aCol5(0x00F0F0F0); - pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); + pDevice->setPixel( aPt2, aCol5, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #8", pDevice->getPixel(aPt2) != aCol7); const Color aCol6(0x00FFFFFF); - pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); + pDevice->setPixel( aPt3, aCol6, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #9", pDevice->getPixel(aPt3) == aCol6); } @@ -249,17 +249,17 @@ public: basebmp::getBitmapDeviceStrideForWidth(FORMAT_TWENTYFOUR_BIT_TC_MASK, aSize.getX())); const Color aCol4(0x01010101); - pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); + pDevice->setPixel( aPt, aCol4, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #10", pDevice->getPixel(aPt) == aCol4); const Color aCol5(0x0F3F2F1F); - pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); + pDevice->setPixel( aPt2, aCol5, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #11", pDevice->getPixel(aPt2) == aCol5); const Color aCol6(0xFFFFFFFF); - pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); + pDevice->setPixel( aPt3, aCol6, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #12", pDevice->getPixel(aPt3) == aCol6); @@ -277,17 +277,17 @@ public: basebmp::getBitmapDeviceStrideForWidth(FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA, aSize.getX())); const Color aCol4(0x01010101); - pDevice->setPixel( aPt, aCol4, DrawMode_PAINT ); + pDevice->setPixel( aPt, aCol4, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #13", pDevice->getPixel(aPt) == aCol4); const Color aCol5(0x0F0F0F0F); - pDevice->setPixel( aPt2, aCol5, DrawMode_PAINT ); + pDevice->setPixel( aPt2, aCol5, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #14", pDevice->getPixel(aPt2) == aCol5); const Color aCol6(0xFFFFFFFF); - pDevice->setPixel( aPt3, aCol6, DrawMode_PAINT ); + pDevice->setPixel( aPt3, aCol6, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("get/setPixel roundtrip #15", pDevice->getPixel(aPt3) == aCol6); } diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx index c9df8b20977d..b3e4b68bcef9 100644 --- a/basebmp/test/bmpmasktest.cxx +++ b/basebmp/test/bmpmasktest.cxx @@ -63,7 +63,7 @@ private: mpMaskBmp1bpp, aSourceRect, aDestAll, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 30", countPixel( rDevice, aCol ) == 30); } @@ -82,7 +82,7 @@ private: mpMaskBmp1bpp, aSourceRect, aDestLeftTop, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 12", countPixel( rDevice, aCol ) == 12); } @@ -123,11 +123,11 @@ public: mpBmp1bpp->fillPolyPolygon( aPoly, aColWhite, - DrawMode_PAINT ); + DrawMode::Paint ); mpBmp32bpp->fillPolyPolygon( aPoly, aColWhite, - DrawMode_PAINT ); + DrawMode::Paint ); aSvg = "m 0 0 h6 v10 h-6z" ; @@ -137,7 +137,7 @@ public: mpMaskBmp1bpp->fillPolyPolygon( aPoly, aColBlack, - DrawMode_PAINT ); + DrawMode::Paint ); } void testBmpBasics() diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx index 30644fb74930..19a73730288c 100644 --- a/basebmp/test/bmptest.cxx +++ b/basebmp/test/bmptest.cxx @@ -62,7 +62,7 @@ private: rBmp, aSourceRect, aDestLeftTop, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 8", countPixel( rDevice, aCol ) == 8); @@ -70,7 +70,7 @@ private: rBmp, aSourceRect, aDestRightTop, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 16", countPixel( rDevice, aCol ) == 16); @@ -78,7 +78,7 @@ private: rBmp, aSourceRect, aDestLeftBottom, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 24", countPixel( rDevice, aCol ) == 24); @@ -86,7 +86,7 @@ private: rBmp, aSourceRect, aDestRightBottom, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 32", countPixel( rDevice, aCol ) == 32); @@ -101,7 +101,7 @@ private: pClone, aSourceOverlap, aDestOverlap, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("clobbertest - number of set pixel is not 50", countPixel( rBmp, aCol ) == 50); @@ -123,7 +123,7 @@ private: rBmp, aSourceRect, aDestLeftTop, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 4", countPixel( rDevice, aCol ) == 4); @@ -131,7 +131,7 @@ private: rBmp, aSourceRect, aDestLeftBottom, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 4(c)", countPixel( rDevice, aCol ) == 4); @@ -139,7 +139,7 @@ private: rBmp, aSourceRect, aDestRightBottom, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 8", countPixel( rDevice, aCol ) == 8); } @@ -174,11 +174,11 @@ public: mpBmp1bpp->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); mpBmp32bpp->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); } void testBmpBasics() diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx index 13ad48c37a43..ad64b1e43be4 100644 --- a/basebmp/test/cliptest.cxx +++ b/basebmp/test/cliptest.cxx @@ -53,22 +53,22 @@ private: const basegfx::B2IPoint aPt(0,0); const Color aCol(0xFFFFFFFF); - rDevice->setPixel( aPt, aCol, DrawMode_PAINT, mpClipMask ); + rDevice->setPixel( aPt, aCol, DrawMode::Paint, mpClipMask ); CPPUNIT_ASSERT_MESSAGE("get/setPixel clip #1", rDevice->getPixel(aPt) == aBgCol); const basegfx::B2IPoint aPt2(10,10); - rDevice->setPixel( aPt2, aCol, DrawMode_PAINT, mpClipMask ); + rDevice->setPixel( aPt2, aCol, DrawMode::Paint, mpClipMask ); CPPUNIT_ASSERT_MESSAGE("get/setPixel clip #2", rDevice->getPixel(aPt2) == aBgCol); const basegfx::B2IPoint aPt1(10,0); - rDevice->setPixel( aPt1, aCol, DrawMode_PAINT, mpClipMask ); + rDevice->setPixel( aPt1, aCol, DrawMode::Paint, mpClipMask ); CPPUNIT_ASSERT_MESSAGE("get/setPixel clip #3", rDevice->getPixel(aPt1) != aBgCol); const basegfx::B2IPoint aPt3(0,10); - rDevice->setPixel( aPt3, aCol, DrawMode_PAINT, mpClipMask ); + rDevice->setPixel( aPt3, aCol, DrawMode::Paint, mpClipMask ); CPPUNIT_ASSERT_MESSAGE("get/setPixel clip #4", rDevice->getPixel(aPt3) != aBgCol); } @@ -81,7 +81,7 @@ private: const basegfx::B2IPoint aPt1(0,0); const basegfx::B2IPoint aPt2(1,9); const Color aCol(0xFFFFFFFF); - rDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT, mpClipMask ); + rDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint, mpClipMask ); const basegfx::B2IPoint aPt3(1,5); CPPUNIT_ASSERT_MESSAGE("get line pixel", @@ -90,7 +90,7 @@ private: countPixel( rDevice, rDevice->getPixel(aPt3) ) == 4); - rDevice->drawLine( aPt1, aPt2, aCol, DrawMode_XOR, mpClipMask ); + rDevice->drawLine( aPt1, aPt2, aCol, DrawMode::XOR, mpClipMask ); CPPUNIT_ASSERT_MESSAGE("number of xor-rendered line pixel is not 0", countPixel( rDevice, rDevice->getPixel(aPt3) ) == 121); @@ -105,7 +105,7 @@ private: rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aAllOver)), aCol, - DrawMode_PAINT, + DrawMode::Paint, mpClipMask ); const basegfx::B2IPoint aPt(0,10); CPPUNIT_ASSERT_MESSAGE("number of clipped pixel is not 30", @@ -114,14 +114,14 @@ private: rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aAllOver)), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of filled pixel is not 121", countPixel( rDevice, rDevice->getPixel(aPt) ) == 121); rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aAllOver)), aCol, - DrawMode_XOR, + DrawMode::XOR, mpClipMask ); CPPUNIT_ASSERT_MESSAGE("number of xor-cleared pixel is not 91", countPixel( rDevice, rDevice->getPixel(aPt) ) == 121-30); @@ -135,15 +135,15 @@ private: Color aCol1(0); Color aCol2(0xFFFFFFFF); pBmp->clear(aCol1); - pBmp->setPixel(basegfx::B2IPoint(0,0),aCol2,DrawMode_PAINT); - pBmp->setPixel(basegfx::B2IPoint(1,1),aCol2,DrawMode_PAINT); - pBmp->setPixel(basegfx::B2IPoint(2,2),aCol2,basebmp::DrawMode_PAINT); + pBmp->setPixel(basegfx::B2IPoint(0,0),aCol2,DrawMode::Paint); + pBmp->setPixel(basegfx::B2IPoint(1,1),aCol2,DrawMode::Paint); + pBmp->setPixel(basegfx::B2IPoint(2,2),aCol2,basebmp::DrawMode::Paint); rDevice->clear(aCol1); rDevice->drawBitmap(pBmp, basegfx::B2IBox(0,0,3,3), basegfx::B2IBox(-1,-1,4,4), - DrawMode_PAINT, + DrawMode::Paint, mpClipMask); const basegfx::B2IPoint aPt(1,1); @@ -168,7 +168,7 @@ private: pBmp->fillPolyPolygon( aPoly, aCol, - basebmp::DrawMode_PAINT ); + basebmp::DrawMode::Paint ); const basegfx::B2IBox aSourceRect(0,0,10,10); const basegfx::B2IPoint aDestLeftTop(0,0); @@ -209,7 +209,7 @@ public: mpClipMask->drawPolygon( aPoly.getB2DPolygon(0), Color(0xFFFFFFFF), - DrawMode_PAINT ); + DrawMode::Paint ); } void testPixelClip() diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx index 875a27dac2e5..f476710c148a 100644 --- a/basebmp/test/filltest.cxx +++ b/basebmp/test/filltest.cxx @@ -55,7 +55,7 @@ private: basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aRect )), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); const basegfx::B2IPoint aPt1(1,1); CPPUNIT_ASSERT_MESSAGE("first pixel set", @@ -90,7 +90,7 @@ private: basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aEmpty1 )), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 0", countPixel( rDevice, aCol ) == 0); @@ -98,7 +98,7 @@ private: basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aEmpty2 )), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 0", countPixel( rDevice, aCol ) == 0); @@ -106,7 +106,7 @@ private: basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aVertLineLeft )), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 11", countPixel( rDevice, aCol ) == 11); const basegfx::B2IPoint aPt1(0,0); @@ -117,7 +117,7 @@ private: basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aVertLineRight )), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 22", countPixel( rDevice, aCol ) == 22); const basegfx::B2IPoint aPt2(10,10); @@ -128,7 +128,7 @@ private: basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aHorzLineTop )), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 31", countPixel( rDevice, aCol ) == 31); const basegfx::B2IPoint aPt3(5,0); @@ -139,7 +139,7 @@ private: basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aHorzLineBottom )), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 40", countPixel( rDevice, aCol ) == 40); const basegfx::B2IPoint aPt4(5,10); @@ -153,7 +153,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 43", countPixel( rDevice, aCol ) == 43); } @@ -172,35 +172,35 @@ private: rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aLeftTop)), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 1", countPixel( rDevice, aCol ) == 1); rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aRightTop)), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 2", countPixel( rDevice, aCol ) == 2); rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aLeftBottom)), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 3", countPixel( rDevice, aCol ) == 3); rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aRightBottom)), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 4", countPixel( rDevice, aCol ) == 4); rDevice->fillPolyPolygon( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect(aAllOver)), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 121", countPixel( rDevice, aCol ) == 121); } diff --git a/basebmp/test/linetest.cxx b/basebmp/test/linetest.cxx index 731158e693f6..552ae4d0e90c 100644 --- a/basebmp/test/linetest.cxx +++ b/basebmp/test/linetest.cxx @@ -46,7 +46,7 @@ private: const basegfx::B2IPoint aPt1(1,1); const basegfx::B2IPoint aPt2(9,9); const Color aCol(0xFFFFFFFF); - rDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT ); + rDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("first pixel set", rDevice->getPixel(aPt1) == aCol); CPPUNIT_ASSERT_MESSAGE("last pixel set", @@ -61,7 +61,7 @@ private: CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 9", countPixel( rDevice, aCol ) == 9); - rDevice->drawLine( aPt2, aPt1, aCol, DrawMode_PAINT ); + rDevice->drawLine( aPt2, aPt1, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel after " "reversed paint is not 9", @@ -75,7 +75,7 @@ private: const basegfx::B2IPoint aPt1(10,10); const basegfx::B2IPoint aPt2(0,10); const Color aCol(0xFFFFFFFF); - rDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT ); + rDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("first pixel set", rDevice->getPixel(aPt1) == aCol); CPPUNIT_ASSERT_MESSAGE("last pixel set", @@ -84,7 +84,7 @@ private: countPixel( rDevice, aCol ) == 11); rDevice->clear(Color(0)); - rDevice->drawLine( aPt2, aPt1, aCol, DrawMode_PAINT ); + rDevice->drawLine( aPt2, aPt1, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("first pixel set", rDevice->getPixel(aPt1) == aCol); CPPUNIT_ASSERT_MESSAGE("last pixel set", @@ -100,7 +100,7 @@ private: const basegfx::B2IPoint aPt1(1,1); const basegfx::B2IPoint aPt2(1,9); const Color aCol(0xFFFFFFFF); - rDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT ); + rDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("first pixel set", rDevice->getPixel(aPt1) == aCol); CPPUNIT_ASSERT_MESSAGE("last pixel set", @@ -125,7 +125,7 @@ private: const basegfx::B2IPoint aPt1(1,1); const basegfx::B2IPoint aPt2(3,2); const Color aCol(0xFFFFFFFF); - rDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT ); + rDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("first pixel set", rDevice->getPixel(aPt1) == aCol); CPPUNIT_ASSERT_MESSAGE("second pixel set", @@ -136,7 +136,7 @@ private: "reversed paint is not 3", countPixel( rDevice, aCol ) == 3); - rDevice->drawLine( aPt2, aPt1, aCol, DrawMode_PAINT ); + rDevice->drawLine( aPt2, aPt1, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("alternate second pixel set", rDevice->getPixel(basegfx::B2IPoint(2,2)) == aCol); @@ -174,7 +174,7 @@ public: pDevice->getPixelData(aPt1) == 0); const Color aCol(0xFFFFFFFF); - pDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT ); + pDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("only pixel set", pDevice->getPixelData(aPt1) == 1); @@ -188,7 +188,7 @@ public: CPPUNIT_ASSERT_MESSAGE("only pixel cleared", pDevice->getPixelData(aPt1) == 0); - pDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT ); + pDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("only pixel still cleared", pDevice->getPixelData(aPt1) == 0); } diff --git a/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx index 7b4559cd6784..5b7780259acc 100644 --- a/basebmp/test/masktest.cxx +++ b/basebmp/test/masktest.cxx @@ -61,7 +61,7 @@ private: rDevice->setPixel( basegfx::B2IPoint(1,1), aCol2, - DrawMode_PAINT); + DrawMode::Paint); rDevice->drawMaskedColor( aCol2, rBmp, @@ -124,7 +124,7 @@ public: mpMask->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); } void testMaskBasics() diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx index 60746d753756..24b51fa26555 100644 --- a/basebmp/test/polytest.cxx +++ b/basebmp/test/polytest.cxx @@ -58,7 +58,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 0", countPixel( rDevice, aCol ) == 0); @@ -72,7 +72,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 0(b)", countPixel( rDevice, aCol ) == 0); } @@ -90,7 +90,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 7", countPixel( rDevice, aCol ) == 7); @@ -104,7 +104,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 6", countPixel( rDevice, aCol ) == 6); @@ -118,7 +118,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 3", countPixel( rDevice, aCol ) == 3); } @@ -137,7 +137,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 40", countPixel( rDevice, aCol ) == 40); } @@ -161,7 +161,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 39", countPixel( rDevice, aCol ) == 39); @@ -176,7 +176,7 @@ private: pClippedDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 7", countPixel( rDevice, aCol ) == 7); } @@ -197,7 +197,7 @@ private: // clippedlinerenderer.hxx, first point not clipped const basegfx::B2IPoint aPt1(3,3); const basegfx::B2IPoint aPt2(4,2); - pClippedDevice->drawLine( aPt1, aPt2, aCol, DrawMode_PAINT ); + pClippedDevice->drawLine( aPt1, aPt2, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 1", countPixel( rDevice, aCol ) == 1); @@ -205,7 +205,7 @@ private: // trigger "alternate bresenham" case in // clippedlinerenderer.hxx, both start and endpoint clipped const basegfx::B2IPoint aPt3(0,4); - pClippedDevice->drawLine( aPt3, aPt2, aCol, DrawMode_XOR ); + pClippedDevice->drawLine( aPt3, aPt2, aCol, DrawMode::XOR ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 0", countPixel( rDevice, aCol ) == 0); @@ -213,7 +213,7 @@ private: // trigger "standard bresenham" case in // clippedlinerenderer.hxx, first point not clipped const basegfx::B2IPoint aPt4(6,2); - pClippedDevice->drawLine( aPt1, aPt4, aCol, DrawMode_PAINT ); + pClippedDevice->drawLine( aPt1, aPt4, aCol, DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 2", countPixel( rDevice, aCol ) == 2); @@ -225,7 +225,7 @@ private: // one, otherwise swap kicks in) const basegfx::B2IPoint aPt5(1,1); const basegfx::B2IPoint aPt6(6,10); - pClippedDevice->drawLine( aPt5, aPt6, aCol, DrawMode_XOR ); + pClippedDevice->drawLine( aPt5, aPt6, aCol, DrawMode::XOR ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 6", countPixel( rDevice, aCol ) == 6); @@ -233,7 +233,7 @@ private: // trigger "clipCode1 & (aMinFlag|aMaxFlag)" case in // clippedlinerenderer.hxx that was not taken for the test // above - pClippedDevice->drawLine( aPt3, aPt6, aCol, DrawMode_XOR ); + pClippedDevice->drawLine( aPt3, aPt6, aCol, DrawMode::XOR ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 8", countPixel( rDevice, aCol ) == 8); @@ -261,7 +261,7 @@ private: pClippedDevice->drawPolygon( aPoly.getB2DPolygon(i), aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 7", countPixel( rDevice, aCol ) == 7); @@ -284,7 +284,7 @@ private: rDevice->fillPolyPolygon( aPoly, aCol, - DrawMode_PAINT ); + DrawMode::Paint ); CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 46", countPixel( rDevice, aCol ) == 46); } |