diff options
-rw-r--r-- | emfio/qa/cppunit/emf/EmfImportTest.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index e8d4833e6424..e81a37d48487 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx @@ -26,7 +26,6 @@ #include <drawinglayer/primitive2d/Primitive2DContainer.hxx> #include <drawinglayer/tools/primitive2dxmldump.hxx> -#include <vcl/bitmapaccess.hxx> #include <memory> @@ -383,19 +382,13 @@ void Test::TestPdfInEmf() // height was only 5cm, so it looked blurry. CPPUNIT_ASSERT_EQUAL(14321.0, pVectorGraphicData->getSizeHint().getY()); -#if !defined(WNT) && !defined(MACOSX) - // Hmm, manual testing on Windows looks OK. - BitmapEx aBitmapEx = aGraphic.GetBitmapEx(); - AlphaMask aMask = aBitmapEx.GetAlpha(); - Bitmap::ScopedReadAccess pAccess(aMask); - Color aColor(pAccess->GetPixel(0, 0)); // Without the accompanying fix in place, this test would have failed with: - // - Expected: 220 + // - Expected: 255 // - Actual : 0 - // i.e. the pixel at the top left corner was entirely opaque, while it should be mostly - // transparent. - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>(220), aColor.GetBlue()); -#endif + // i.e. the pixel in the center was entirely opaque, while it should be transparent. + BitmapEx aBitmapEx = aGraphic.GetBitmapEx(); + Size size = aBitmapEx.GetSizePixel(); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>(255), aBitmapEx.GetTransparency(size.Width() / 2, size.Height() / 2)); } CPPUNIT_TEST_SUITE_REGISTRATION(Test); |