summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/print2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/print2.cxx')
-rw-r--r--vcl/source/gdi/print2.cxx37
1 files changed, 34 insertions, 3 deletions
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 38c589eb12b2..5a23eb406bc3 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -34,18 +34,22 @@
#include <utility>
#include <list>
#include <vector>
+
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+
#include <tools/debug.hxx>
+
#include <vcl/virdev.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/print.h>
#include <vcl/salbtype.hxx>
#include <vcl/print.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/sallayout.hxx>
#include <vcl/bmpacc.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
+
+#include <print.h>
#include "pdfwriter_impl.hxx"
@@ -112,6 +116,9 @@ static bool ImplIsActionSpecial( const MetaAction& rAct )
case META_BMPEXSCALEPART_ACTION:
return static_cast<const MetaBmpExScalePartAction&>(rAct).GetBitmapEx().IsTransparent();
+ case META_RENDERGRAPHIC_ACTION:
+ return true;
+
default:
return false;
}
@@ -199,6 +206,16 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
aBmpEx = static_cast<const MetaBmpExScaleAction&>(rAct).GetBitmapEx();
break;
+ case META_RENDERGRAPHIC_ACTION:
+ {
+ const ::vcl::RenderGraphicRasterizer aRasterizer( static_cast<const MetaRenderGraphicAction&>(rAct).
+ GetRenderGraphic() );
+
+ aBmpEx = aRasterizer.Rasterize( rStateOutDev.LogicToPixel(
+ static_cast<const MetaRenderGraphicAction&>(rAct).GetSize() ) );
+ break;
+ }
+
case META_TRANSPARENT_ACTION:
default:
@@ -266,6 +283,11 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcSize(),
aBmp ));
break;
+ case META_RENDERGRAPHIC_ACTION:
+ o_rMtf.AddAction( new MetaBmpScaleAction(
+ static_cast<const MetaRenderGraphicAction&>(rAct).GetPoint(),
+ static_cast<const MetaRenderGraphicAction&>(rAct).GetSize(),
+ aBmp ));
default:
OSL_FAIL("Unexpected case");
break;
@@ -378,6 +400,7 @@ static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rO
case META_TEXTRECT_ACTION:
case META_STRETCHTEXT_ACTION:
case META_TEXTLINE_ACTION:
+ case META_RENDERGRAPHIC_ACTION:
// all other actions: generate non-transparent output
bRet = true;
break;
@@ -630,7 +653,14 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_TEXTLINE_ACTION:
OSL_FAIL("META_TEXTLINE_ACTION not supported");
- break;
+ break;
+
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ const MetaRenderGraphicAction& rRenderAct = static_cast<const MetaRenderGraphicAction&>(rAct);
+ aActionBounds = Rectangle( rRenderAct.GetPoint(), rRenderAct.GetSize() );
+ }
+ break;
default:
break;
@@ -657,6 +687,7 @@ static bool ImplIsActionHandlingTransparency( const MetaAction& rAct )
case META_BMPEX_ACTION:
case META_BMPEXSCALE_ACTION:
case META_BMPEXSCALEPART_ACTION:
+ case META_RENDERGRAPHIC_ACTION:
return true;
default: