summaryrefslogtreecommitdiff
path: root/basebmp/test
diff options
context:
space:
mode:
authorThorsten Behrens <thb@openoffice.org>2006-06-02 15:14:23 +0000
committerThorsten Behrens <thb@openoffice.org>2006-06-02 15:14:23 +0000
commit781ee266d8ca9d90e64ce8d0cf4b86f014fd6b83 (patch)
treee565e6a60b068a26edb7796e14fdbb4c58558137 /basebmp/test
parentdb83a2292b3e75df100bf377c5202b11f423c9d7 (diff)
#i65904# Added template meta function to retrieve palette lookup functor; for palette images, now performing lookup only _once_, and rasterizing the primitive with the index value; added one more degenerate case for polygon fill test
Diffstat (limited to 'basebmp/test')
-rw-r--r--basebmp/test/filltest.cxx31
1 files changed, 27 insertions, 4 deletions
diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx
index fcaa08058df7..c3ec1137c615 100644
--- a/basebmp/test/filltest.cxx
+++ b/basebmp/test/filltest.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: filltest.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: thb $ $Date: 2006-06-02 08:36:15 $
+ * last change: $Author: thb $ $Date: 2006-06-02 16:14:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -42,6 +42,8 @@
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
@@ -100,7 +102,8 @@ private:
{
rDevice->clear(Color(0));
- const basegfx::B2DRange aEmpty(0,0,0,11);
+ const basegfx::B2DRange aEmpty1(0,0,0,11);
+ const basegfx::B2DRange aEmpty2(0,0,11,0);
const basegfx::B2DRange aVertLineLeft(0,0,1,11);
const basegfx::B2DRange aVertLineRight(10,0,11,11);
const basegfx::B2DRange aHorzLineTop(0,0,11,1);
@@ -109,7 +112,15 @@ private:
const Color aCol(0xFFFFFFFF);
rDevice->fillPolyPolygon(
basegfx::B2DPolyPolygon(
- basegfx::tools::createPolygonFromRect( aEmpty )),
+ basegfx::tools::createPolygonFromRect( aEmpty1 )),
+ aCol,
+ DrawMode_PAINT );
+ CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 0",
+ countPixel( rDevice, aCol ) == 0);
+
+ rDevice->fillPolyPolygon(
+ basegfx::B2DPolyPolygon(
+ basegfx::tools::createPolygonFromRect( aEmpty2 )),
aCol,
DrawMode_PAINT );
CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 0",
@@ -158,6 +169,18 @@ private:
const basegfx::B2IPoint aPt4(5,10);
CPPUNIT_ASSERT_MESSAGE("bottom-middle pixel set",
rDevice->getPixel(aPt4) == aCol);
+
+ ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
+ "m 0 0l7 7h-1z" );
+
+ basegfx::B2DPolyPolygon aPoly;
+ basegfx::tools::importFromSvgD( aPoly, aSvg );
+ rDevice->fillPolyPolygon(
+ aPoly,
+ aCol,
+ DrawMode_PAINT );
+ CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 43",
+ countPixel( rDevice, aCol ) == 43);
}
void implTestClipping(const BitmapDeviceSharedPtr& rDevice)