build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / include / drawinglayer / processor2d / canvasprocessor.hxx
blobab773c8073c761cad0a006af2f9d70f3aac40ddc
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_CANVASPROCESSOR_HXX
21 #define INCLUDED_DRAWINGLAYER_PROCESSOR2D_CANVASPROCESSOR_HXX
23 #include <basegfx/color/bcolormodifier.hxx>
24 #include <basegfx/matrix/b2dhommatrix.hxx>
25 #include <basegfx/polygon/b2dpolypolygon.hxx>
26 #include <com/sun/star/rendering/RenderState.hpp>
27 #include <com/sun/star/rendering/ViewState.hpp>
28 #include <drawinglayer/drawinglayerdllapi.h>
29 #include <drawinglayer/processor2d/baseprocessor2d.hxx>
30 #include <i18nlangtag/lang.h>
31 #include <svtools/optionsdrawinglayer.hxx>
32 #include <vcl/mapmod.hxx>
33 #include <vcl/vclptr.hxx>
35 namespace basegfx {
36 class BColor;
37 class B2DPolygon;
40 namespace com { namespace sun { namespace star { namespace rendering {
41 class XCanvas;
42 class XPolyPolygon2D;
43 }}}}
45 namespace drawinglayer { namespace primitive2d {
46 class MaskPrimitive2D;
47 class MetafilePrimitive2D;
48 class TextSimplePortionPrimitive2D;
49 class BitmapPrimitive2D;
50 class TransparencePrimitive2D;
51 class PolygonStrokePrimitive2D;
52 class FillBitmapPrimitive2D;
53 class UnifiedTransparencePrimitive2D;
56 namespace drawinglayer
58 namespace processor2d
60 /** canvasProcessor2D class
62 A basic implementation of a renderer for css::rendering::XCanvas
63 as a target
65 class DRAWINGLAYER_DLLPUBLIC canvasProcessor2D : public BaseProcessor2D
67 private:
68 // the (current) destination OutDev and canvas
69 VclPtr<OutputDevice> mpOutputDevice;
70 css::uno::Reference< css::rendering::XCanvas > mxCanvas;
71 css::rendering::ViewState maViewState;
72 css::rendering::RenderState maRenderState;
74 // the modifiedColorPrimitive stack
75 basegfx::BColorModifierStack maBColorModifierStack;
77 // SvtOptionsDrawinglayer incarnation to react on diverse settings
78 const SvtOptionsDrawinglayer maDrawinglayerOpt;
80 // the current clipping tools::PolyPolygon from MaskPrimitive2D, always in
81 // object coordinates
82 basegfx::B2DPolyPolygon maClipPolyPolygon;
84 // determined LanguageType
85 LanguageType meLang;
87 // as tooling, the process() implementation takes over API handling and calls this
88 // virtual render method when the primitive implementation is BasePrimitive2D-based.
89 virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
91 // direct primitive renderer support
92 void impRenderMaskPrimitive2D(const primitive2d::MaskPrimitive2D& rMaskCandidate);
93 void impRenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rMetaCandidate);
94 void impRenderTextSimplePortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
95 void impRenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
96 void impRenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransparenceCandidate);
97 void impRenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive);
98 void impRenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapPrimitive2D);
99 void impRenderUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
101 public:
102 canvasProcessor2D(
103 const geometry::ViewInformation2D& rViewInformation,
104 OutputDevice& rOutDev);
105 virtual ~canvasProcessor2D();
107 // access to Drawinglayer configuration options
108 const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
110 } // end of namespace processor2d
111 } // end of namespace drawinglayer
113 #endif // INCLUDED_DRAWINGLAYER_PROCESSOR2D_CANVASPROCESSOR_HXX
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */