summaryrefslogtreecommitdiff
path: root/vcl/qa/cppunit/outdev.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/qa/cppunit/outdev.cxx')
-rw-r--r--vcl/qa/cppunit/outdev.cxx71
1 files changed, 0 insertions, 71 deletions
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 0a635a1a139d..5f78c5127807 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -44,7 +44,6 @@ public:
void testDrawScalePartBitmap();
void testDrawTransformedBitmapEx();
void testDrawTransformedBitmapExFlip();
- void testCroppedDownsampledBitmap();
void testRTL();
void testRTLGuard();
void testDefaultFillColor();
@@ -78,7 +77,6 @@ public:
CPPUNIT_TEST(testGetReadableFontColorWindow);
CPPUNIT_TEST(testDrawTransformedBitmapEx);
CPPUNIT_TEST(testDrawTransformedBitmapExFlip);
- CPPUNIT_TEST(testCroppedDownsampledBitmap);
CPPUNIT_TEST(testRTL);
CPPUNIT_TEST(testRTLGuard);
CPPUNIT_TEST(testDefaultFillColor);
@@ -514,75 +512,6 @@ void VclOutdevTest::testDrawTransformedBitmapExFlip()
CPPUNIT_ASSERT_EQUAL_MESSAGE(ss.str(), COL_BLACK, Color(aColor));
}
-namespace
-{
-class DownsampleBitmapTester : public OutputDevice
-{
-public:
- DownsampleBitmapTester()
- : OutputDevice(OUTDEV_VIRDEV)
- , maBitmap(Bitmap(Size(16, 16), vcl::PixelFormat::N24_BPP))
- {
- SetDPIX(96);
- SetDPIY(96);
- }
-
- bool AcquireGraphics() const { return true; }
- void ReleaseGraphics(bool) {}
- bool UsePolyPolygonForComplexGradient() { return false; }
-
- Bitmap testCropFullyOutsideBounds()
- {
- return GetDownsampledBitmap(Size(10, 10), Point(20, 20), Size(5, 5), maBitmap, 72, 72);
- }
-
- Bitmap testCropSameSize()
- {
- return GetDownsampledBitmap(Size(10, 10), Point(0, 0), maBitmap.GetSizePixel(), maBitmap,
- 72, 72);
- }
-
- Bitmap testFullyOvercrop()
- {
- return GetDownsampledBitmap(Size(10, 10), Point(0, 0), Size(100, 100), maBitmap, 72, 72);
- }
-
- Bitmap testPartiallyOvercrop()
- {
- return GetDownsampledBitmap(Size(10, 10), Point(10, 10), Size(100, 100), maBitmap, 72, 72);
- }
-
-private:
- Bitmap maBitmap;
-};
-}
-
-void VclOutdevTest::testCroppedDownsampledBitmap()
-{
- ScopedVclPtrInstance<DownsampleBitmapTester> pTester;
-
- {
- Bitmap aDownsampledBmp(pTester->testCropFullyOutsideBounds());
- CPPUNIT_ASSERT_MESSAGE("Crop was fully outside of bitmap bounds",
- aDownsampledBmp.IsEmpty());
- }
-
- {
- Bitmap aDownsampledBmp(pTester->testCropSameSize());
- CPPUNIT_ASSERT_MESSAGE("Crop same size as bitmap", !aDownsampledBmp.IsEmpty());
- }
-
- {
- Bitmap aDownsampledBmp(pTester->testFullyOvercrop());
- CPPUNIT_ASSERT_MESSAGE("Crop larger than bitmap", !aDownsampledBmp.IsEmpty());
- }
-
- {
- Bitmap aDownsampledBmp(pTester->testPartiallyOvercrop());
- CPPUNIT_ASSERT_MESSAGE("Crop partially overcrops bitmap", !aDownsampledBmp.IsEmpty());
- }
-}
-
void VclOutdevTest::testRTL()
{
ScopedVclPtrInstance<vcl::Window> pWindow(nullptr, WB_APP | WB_STDWORK);