diff options
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 77 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 1 |
2 files changed, 0 insertions, 78 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6b52a122df42..703b6f4f53a3 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -10256,83 +10256,6 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal } } -void PDFWriterImpl::drawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPattern, bool bEOFill ) -{ - if( nPattern < 0 || nPattern >= (sal_Int32)m_aTilings.size() ) - return; - - m_aPages.back().endStream(); - sal_Int32 nXObject = createObject(); - OStringBuffer aNameBuf( 16 ); - aNameBuf.append( "Pol" ); - aNameBuf.append( nXObject ); - OString aObjName( aNameBuf.makeStringAndClear() ); - Rectangle aObjRect; - if( updateObject( nXObject ) ) - { - // get bounding rect of object - PolyPolygon aSubDiv; - rPolyPoly.AdaptiveSubdivide( aSubDiv ); - aObjRect = aSubDiv.GetBoundRect(); - Rectangle aConvObjRect( aObjRect ); - m_aPages.back().convertRect( aConvObjRect ); - - // move polypolygon to bottom left of page - PolyPolygon aLocalPath( rPolyPoly ); - sal_Int32 nPgWd = getReferenceDevice()->ImplGetDPIX() * m_aPages.back().getWidth() / 72; - sal_Int32 nPgHt = getReferenceDevice()->ImplGetDPIY() * m_aPages.back().getHeight() / 72; - Size aLogicPgSz = getReferenceDevice()->PixelToLogic( Size( nPgWd, nPgHt ), m_aGraphicsStack.front().m_aMapMode ); - sal_Int32 nXOff = aObjRect.Left(); - sal_Int32 nYOff = aLogicPgSz.Height() - aObjRect.Bottom(); - aLocalPath.Move( -nXOff, nYOff ); - - // prepare XObject's content stream - OStringBuffer aStream( 512 ); - aStream.append( "/Pattern cs /P" ); - aStream.append( m_aTilings[ nPattern ].m_nObject ); - aStream.append( " scn\n" ); - m_aPages.back().appendPolyPolygon( aLocalPath, aStream ); - aStream.append( bEOFill ? "f*" : "f" ); - SvMemoryStream aMemStream( aStream.getLength() ); - aMemStream.Write( aStream.getStr(), aStream.getLength() ); - bool bDeflate = compressStream( &aMemStream ); - aMemStream.Seek( STREAM_SEEK_TO_END ); - sal_Int32 nStreamLen = (sal_Int32)aMemStream.Tell(); - aMemStream.Seek( STREAM_SEEK_TO_BEGIN ); - - // add new XObject to global resource dict - m_aGlobalResourceDict.m_aXObjects[ aObjName ] = nXObject; - - // write XObject - OStringBuffer aLine( 512 ); - aLine.append( nXObject ); - aLine.append( " 0 obj\n" - "<</Type/XObject/Subtype/Form/BBox[0 0 " ); - appendFixedInt( aConvObjRect.GetWidth(), aLine ); - aLine.append( ' ' ); - appendFixedInt( aConvObjRect.GetHeight(), aLine ); - aLine.append( "]/Length " ); - aLine.append( nStreamLen ); - if( bDeflate ) - aLine.append( "/Filter/FlateDecode" ); - aLine.append( ">>\n" - "stream\n" ); - writeBuffer( aLine.getStr(), aLine.getLength() ); - checkAndEnableStreamEncryption( nXObject ); - writeBuffer( aMemStream.GetData(), nStreamLen ); - disableStreamEncryption(); - writeBuffer( "\nendstream\nendobj\n\n", 19 ); - } - m_aPages.back().beginStream(); - OStringBuffer aLine( 80 ); - aLine.append( "q 1 0 0 1 " ); - m_aPages.back().appendPoint( aObjRect.BottomLeft(), aLine ); - aLine.append( " cm/" ); - aLine.append( aObjName ); - aLine.append( " Do Q\n" ); - writeBuffer( aLine.getStr(), aLine.getLength() ); -} - void PDFWriterImpl::updateGraphicsState() { OStringBuffer aLine( 256 ); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index fd1c2d742706..b5f1167a0fdb 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1248,7 +1248,6 @@ public: void drawTransparent( const PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent ); void beginTransparencyGroup(); void endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent ); - void drawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPattern, bool bEOFill ); void emitComment( const char* pComment ); |