diff options
author | Thorsten Behrens <thb@openoffice.org> | 2006-07-11 10:39:41 +0000 |
---|---|---|
committer | Thorsten Behrens <thb@openoffice.org> | 2006-07-11 10:39:41 +0000 |
commit | 01878a9bddbb00b89876d89537ec6ba8ded33a65 (patch) | |
tree | 7ac690e7f97cfa03d974246ff4243fdbe84a71bf /basebmp/test/bmpdemo.cxx | |
parent | INTEGRATION: CWS pdf03 (1.92.20); FILE MERGED (diff) | |
download | core-01878a9bddbb00b89876d89537ec6ba8ded33a65.tar.gz core-01878a9bddbb00b89876d89537ec6ba8ded33a65.zip |
#i65904# Consistently named constants; added rectangular device subsetting to BitmapDevice; moved spreaded pixel format configuration points into a single traits template (per format); slightly improved cross-format support
Diffstat (limited to 'basebmp/test/bmpdemo.cxx')
-rw-r--r-- | basebmp/test/bmpdemo.cxx | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx index 8f699dc05a18..fc5c7752fe06 100644 --- a/basebmp/test/bmpdemo.cxx +++ b/basebmp/test/bmpdemo.cxx @@ -4,9 +4,9 @@ * * $RCSfile: bmpdemo.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: thb $ $Date: 2006-06-30 11:05:21 $ + * last change: $Author: thb $ $Date: 2006-07-11 11:38:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1082,6 +1082,31 @@ void TestWindow::Paint( const Rectangle& rRect ) basebmp::Format::THIRTYTWO_BIT_TC_MASK )); { + basebmp::BitmapDeviceSharedPtr pMask( basebmp::createBitmapDevice( aTestSize, + false, + basebmp::Format::ONE_BIT_MSB_GREY )); + + ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii( + "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" ); + basegfx::B2DPolyPolygon aPoly; + basegfx::tools::importFromSvgD( aPoly, aSvg ); + pMask->clear(basebmp::Color(0xFFFFFFFF)); + pMask->drawPolygon( + aPoly.getB2DPolygon(0), + basebmp::Color(0), + basebmp::DrawMode_PAINT ); + + basebmp::BitmapDeviceSharedPtr pSubsetDevice = + basebmp::subsetBitmapDevice( pDevice, + basegfx::B2IRange(3,3,7,7) ); + + const basegfx::B2IPoint aPt1(0,0); + const basegfx::B2IPoint aPt2(1,9); + const basebmp::Color aCol(0xFFFFFFFF); + pDevice->drawLine( aPt1, aPt2, aCol, basebmp::DrawMode_PAINT, pMask ); + } + + { const basebmp::Color aCol(0xFFFFFFFF); #if 0 basegfx::B2DPolygon aRect = basegfx::tools::createPolygonFromRect( |