Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLPROCESSOR2D_HXX
30 : : #define INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLPROCESSOR2D_HXX
31 : :
32 : : #include <drawinglayer/drawinglayerdllapi.h>
33 : :
34 : : #include <drawinglayer/processor2d/baseprocessor2d.hxx>
35 : : #include <basegfx/matrix/b2dhommatrix.hxx>
36 : : #include <basegfx/color/bcolormodifier.hxx>
37 : : #include <svtools/optionsdrawinglayer.hxx>
38 : :
39 : : //////////////////////////////////////////////////////////////////////////////
40 : : // predefines
41 : : class OutputDevice;
42 : :
43 : : namespace drawinglayer { namespace primitive2d {
44 : : class TextSimplePortionPrimitive2D;
45 : : class PolygonHairlinePrimitive2D;
46 : : class BitmapPrimitive2D;
47 : : class RenderGraphicPrimitive2D;
48 : : class FillBitmapPrimitive2D;
49 : : class PolyPolygonGradientPrimitive2D;
50 : : class PolyPolygonBitmapPrimitive2D;
51 : : class PolyPolygonColorPrimitive2D;
52 : : class MetafilePrimitive2D;
53 : : class MaskPrimitive2D;
54 : : class UnifiedTransparencePrimitive2D;
55 : : class TransparencePrimitive2D;
56 : : class TransformPrimitive2D;
57 : : class MarkerArrayPrimitive2D;
58 : : class PointArrayPrimitive2D;
59 : : class ModifiedColorPrimitive2D;
60 : : class PolygonStrokePrimitive2D;
61 : : class ControlPrimitive2D;
62 : : class PagePreviewPrimitive2D;
63 : : class EpsPrimitive2D;
64 : : }}
65 : :
66 : : //////////////////////////////////////////////////////////////////////////////
67 : :
68 : : namespace drawinglayer
69 : : {
70 : : namespace processor2d
71 : : {
72 : : /** VclProcessor2D class
73 : :
74 : : This processor is the base class for VCL-Based processors. It has no
75 : : processBasePrimitive2D implementation and thus is not usable directly.
76 : : */
77 : : class DRAWINGLAYER_DLLPUBLIC VclProcessor2D : public BaseProcessor2D
78 : : {
79 : : protected:
80 : : // the destination OutDev
81 : : OutputDevice* mpOutputDevice;
82 : :
83 : : // the modifiedColorPrimitive stack
84 : : basegfx::BColorModifierStack maBColorModifierStack;
85 : :
86 : : // the current transformation. Since VCL pixel renderer transforms to pixels
87 : : // and VCL MetaFile renderer to World (logic) coordinates, the local
88 : : // ViewInformation2D cannot directly be used, but needs to be kept up to date
89 : : basegfx::B2DHomMatrix maCurrentTransformation;
90 : :
91 : : // SvtOptionsDrawinglayer incarnation to react on diverse settings
92 : : const SvtOptionsDrawinglayer maDrawinglayerOpt;
93 : :
94 : : // stack value (increment and decrement) to count how deep we are in
95 : : // PolygonStrokePrimitive2D's decompositions (normally only one)
96 : : sal_uInt32 mnPolygonStrokePrimitive2D;
97 : :
98 : : //////////////////////////////////////////////////////////////////////////////
99 : : // common VCL rendering support
100 : :
101 : : void RenderTextSimpleOrDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
102 : : void RenderPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased);
103 : : void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
104 : : void RenderRenderGraphicPrimitive2D(const primitive2d::RenderGraphicPrimitive2D& rRenderGraphicCandidate);
105 : : void RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate);
106 : : void RenderPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
107 : : void RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate);
108 : : void RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate);
109 : : void RenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rPolygonCandidate);
110 : : void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
111 : : void RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
112 : : void RenderUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
113 : : void RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate);
114 : : void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
115 : : void RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
116 : : void RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
117 : : void RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate);
118 : : void RenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate);
119 : : void RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D);
120 : :
121 : : /////////////////////////////////////////////////////////////////////////////
122 : : // DrawMode adaption support
123 : : void adaptLineToFillDrawMode() const;
124 : : void adaptTextToFillDrawMode() const;
125 : :
126 : : public:
127 : : // constructor/destructor
128 : : VclProcessor2D(
129 : : const geometry::ViewInformation2D& rViewInformation,
130 : : OutputDevice& rOutDev);
131 : : virtual ~VclProcessor2D();
132 : :
133 : : // access to Drawinglayer configuration options
134 : 469651 : const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
135 : : };
136 : : } // end of namespace processor2d
137 : : } // end of namespace drawinglayer
138 : :
139 : : //////////////////////////////////////////////////////////////////////////////
140 : :
141 : : #endif // INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLPROCESSOR2D_HXX
142 : :
143 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|