nss: upgrade to release 3.73
[LibreOffice.git] / drawinglayer / source / processor2d / vclprocessor2d.hxx
blobdbca9ed4ba25b21b51c37ab48430560fb709aa12
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 #pragma once
22 #include <drawinglayer/processor2d/baseprocessor2d.hxx>
23 #include <basegfx/matrix/b2dhommatrix.hxx>
24 #include <basegfx/color/bcolormodifier.hxx>
25 #include <svtools/optionsdrawinglayer.hxx>
26 #include <vcl/vclptr.hxx>
28 class OutputDevice;
30 namespace drawinglayer::primitive2d
32 class TextSimplePortionPrimitive2D;
33 class PolygonHairlinePrimitive2D;
34 class BitmapPrimitive2D;
35 class FillGraphicPrimitive2D;
36 class PolyPolygonGradientPrimitive2D;
37 class PolyPolygonGraphicPrimitive2D;
38 class MetafilePrimitive2D;
39 class MaskPrimitive2D;
40 class UnifiedTransparencePrimitive2D;
41 class TransparencePrimitive2D;
42 class TransformPrimitive2D;
43 class MarkerArrayPrimitive2D;
44 class PointArrayPrimitive2D;
45 class ModifiedColorPrimitive2D;
46 class PolygonStrokePrimitive2D;
47 class ControlPrimitive2D;
48 class PagePreviewPrimitive2D;
49 class EpsPrimitive2D;
50 class ObjectInfoPrimitive2D;
51 class SvgLinearAtomPrimitive2D;
52 class SvgRadialAtomPrimitive2D;
55 namespace drawinglayer::processor2d
57 /** VclProcessor2D class
59 This processor is the base class for VCL-Based processors. It has no
60 processBasePrimitive2D implementation and thus is not usable directly.
62 class VclProcessor2D : public BaseProcessor2D
64 protected:
65 // the destination OutDev
66 VclPtr<OutputDevice> mpOutputDevice;
68 // the modifiedColorPrimitive stack
69 basegfx::BColorModifierStack maBColorModifierStack;
71 // the current transformation. Since VCL pixel renderer transforms to pixels
72 // and VCL MetaFile renderer to World (logic) coordinates, the local
73 // ViewInformation2D cannot directly be used, but needs to be kept up to date
74 basegfx::B2DHomMatrix maCurrentTransformation;
76 // SvtOptionsDrawinglayer incarnation to react on diverse settings
77 const SvtOptionsDrawinglayer maDrawinglayerOpt;
79 // stack value (increment and decrement) to count how deep we are in
80 // PolygonStrokePrimitive2D's decompositions (normally only one)
81 sal_uInt32 mnPolygonStrokePrimitive2D;
83 // currently used ObjectInfoPrimitive2D
84 const primitive2d::ObjectInfoPrimitive2D* mpObjectInfoPrimitive2D;
86 // common VCL rendering support
87 void RenderTextSimpleOrDecoratedPortionPrimitive2D(
88 const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
89 void RenderPolygonHairlinePrimitive2D(
90 const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased);
91 void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
92 void
93 RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate);
94 void RenderPolyPolygonGraphicPrimitive2D(
95 const primitive2d::PolyPolygonGraphicPrimitive2D& rPolygonCandidate);
96 void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
97 void
98 RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
99 void RenderUnifiedTransparencePrimitive2D(
100 const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
101 void RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate);
102 void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
103 void
104 RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
105 void
106 RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
107 void
108 RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate);
109 void RenderPolygonStrokePrimitive2D(
110 const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate);
111 void RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D);
112 void
113 RenderObjectInfoPrimitive2D(const primitive2d::ObjectInfoPrimitive2D& rObjectInfoPrimitive2D);
114 void RenderSvgLinearAtomPrimitive2D(const primitive2d::SvgLinearAtomPrimitive2D& rCandidate);
115 void RenderSvgRadialAtomPrimitive2D(const primitive2d::SvgRadialAtomPrimitive2D& rCandidate);
117 // DrawMode adaptation support
118 void adaptLineToFillDrawMode() const;
119 void adaptTextToFillDrawMode() const;
121 public:
122 // constructor/destructor
123 VclProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev,
124 const basegfx::BColorModifierStack& rInitStack = basegfx::BColorModifierStack());
125 virtual ~VclProcessor2D() override;
127 // access to Drawinglayer configuration options
128 const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
130 // access to currently used ObjectInfoPrimitive2D
131 const primitive2d::ObjectInfoPrimitive2D* getObjectInfoPrimitive2D() const
133 return mpObjectInfoPrimitive2D;
136 } // end of namespace drawinglayer::processor2d
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */