summaryrefslogtreecommitdiff
path: root/basebmp/test
diff options
context:
space:
mode:
Diffstat (limited to 'basebmp/test')
-rw-r--r--basebmp/test/bmpdemo.cxx57
-rw-r--r--basebmp/test/linetest.cxx6
-rw-r--r--basebmp/test/makefile.mk5
3 files changed, 36 insertions, 32 deletions
diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx
index a35a36201187..dd008ffecb32 100644
--- a/basebmp/test/bmpdemo.cxx
+++ b/basebmp/test/bmpdemo.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: bmpdemo.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: thb $ $Date: 2006-06-07 14:27:36 $
+ * last change: $Author: thb $ $Date: 2006-06-08 00:01:48 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -999,43 +999,46 @@ void TestWindow::Paint( const Rectangle& rRect )
{
{
const basegfx::B2ISize aSize(10,10);
- basebmp::BitmapDeviceSharedPtr pBmp( basebmp::createBitmapDevice( aSize,
- true,
- basebmp::Format::EIGHT_BIT_GRAY ));
basebmp::BitmapDeviceSharedPtr pDevice( basebmp::createBitmapDevice( aSize,
true,
- basebmp::Format::ONE_BIT_MSB_PAL ));
+ basebmp::Format::THIRTYTWO_BIT_TC_MASK ));
+ basebmp::BitmapDeviceSharedPtr pMask( basebmp::createBitmapDevice( aSize,
+ true,
+ basebmp::Format::ONE_BIT_MSB_GRAY ));
::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0h5v10h5v-5h-10z" );
-
+ "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" );
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
- const basebmp::Color aCol(0xFFFFFFFF);
- pBmp->clear(basebmp::Color(0));
-
- const basegfx::B2IPoint aPt(3,3);
- const basebmp::Color aCol4(0x01);
- pBmp->setPixel( aPt, aCol4, basebmp::DrawMode_PAINT );
-
- pBmp->fillPolyPolygon(
- aPoly,
- aCol,
+ pMask->clear(basebmp::Color(0xFFFFFFFF));
+ pMask->drawPolygon(
+ aPoly.getB2DPolygon(0),
+ basebmp::Color(0),
basebmp::DrawMode_PAINT );
- const basegfx::B2IRange aSourceRect(0,0,10,10);
- const basegfx::B2IPoint aOutPos(5,5);
- const basebmp::Color aCol2(0xF0F0F0F0);
- pDevice->clear(basebmp::Color(0));
- pDevice->drawMaskedColor(
- aCol2,
- pBmp,
- aSourceRect,
- aOutPos );
+ basebmp::BitmapDeviceSharedPtr pBmp( basebmp::cloneBitmapDevice(
+ basegfx::B2IVector(3,3),
+ pDevice ));
+ basebmp::Color aCol1(0);
+ basebmp::Color aCol2(0xFFFFFFFF);
+ pBmp->clear(aCol1);
+ pBmp->setPixel(basegfx::B2IPoint(0,0),aCol2,basebmp::DrawMode_PAINT);
+ pBmp->setPixel(basegfx::B2IPoint(1,1),aCol2,basebmp::DrawMode_PAINT);
+ pBmp->setPixel(basegfx::B2IPoint(2,2),aCol2,basebmp::DrawMode_PAINT);
+
+ pDevice->clear(aCol1);
+ pDevice->drawBitmap(pBmp,
+ basegfx::B2IRange(0,0,3,3),
+ basegfx::B2IRange(2,2,7,7),
+// basegfx::B2IRange(-1,-1,5,5),
+ basebmp::DrawMode_PAINT,
+ pMask);
std::ofstream output("32bpp_test.dump");
debugDump( pDevice, output );
std::ofstream output2("32bpp_bmp.dump");
debugDump( pBmp, output2 );
+ std::ofstream output3("clipmask.dump");
+ debugDump( pMask, output3 );
}
enum{ srcBitDepth=1, dstBitDepth=4 };
diff --git a/basebmp/test/linetest.cxx b/basebmp/test/linetest.cxx
index 3f4515ebfd72..decb524bc3ba 100644
--- a/basebmp/test/linetest.cxx
+++ b/basebmp/test/linetest.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: linetest.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-08 00:01:48 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -166,7 +166,7 @@ public:
void testBasicVerticalLines()
{
implTestBasicVerticalLines( mpDevice1bpp );
- //implTestBasicVerticalLines( mpDevice32bpp );
+ implTestBasicVerticalLines( mpDevice32bpp );
}
// test pixel rounding (should always tend towards start point of
diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk
index 1ad61ffd7ede..a87f0ded20ba 100644
--- a/basebmp/test/makefile.mk
+++ b/basebmp/test/makefile.mk
@@ -4,9 +4,9 @@
#
# $RCSfile: makefile.mk,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-08 00:01:48 $
#
# The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1.
@@ -66,6 +66,7 @@ CFLAGS += -fno-inline
SHL1OBJS= \
$(SLO)$/basictest.obj \
$(SLO)$/bmptest.obj \
+ $(SLO)$/cliptest.obj \
$(SLO)$/filltest.obj \
$(SLO)$/linetest.obj \
$(SLO)$/masktest.obj \