1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include "vclprocessor2d.hxx"
23 #include <vcl/outdev.hxx>
27 namespace drawinglayer::primitive2d
29 class PolyPolygonColorPrimitive2D
;
30 class PolygonHairlinePrimitive2D
;
31 class PolygonStrokePrimitive2D
;
32 class WrongSpellPrimitive2D
;
33 class TextSimplePortionPrimitive
;
34 class BitmapPrimitive2D
;
35 class PolyPolygonGradientPrimitive2D
;
36 class UnifiedTransparencePrimitive2D
;
37 class ControlPrimitive2D
;
38 class PolygonStrokePrimitive2D
;
39 class FillHatchPrimitive2D
;
40 class BackgroundColorPrimitive2D
;
41 class BorderLinePrimitive2D
;
42 class FillGradientPrimitive2D
;
43 class PatternFillPrimitive2D
;
46 namespace drawinglayer::processor2d
48 /** VclPixelProcessor2D class
50 This processor derived from VclProcessor2D is the base class for rendering
51 all fed primitives to a VCL Window. It is the currently used renderer
52 for all VCL editing output from the DrawingLayer.
54 class VclPixelProcessor2D final
: public VclProcessor2D
56 AntialiasingFlags m_nOrigAntiAliasing
;
58 /* the local processor for BasePrimitive2D-Implementation based primitives,
59 called from the common process()-implementation
61 virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D
& rCandidate
) override
;
63 // some helpers to try direct paints (shortcuts)
64 void tryDrawPolyPolygonColorPrimitive2DDirect(
65 const primitive2d::PolyPolygonColorPrimitive2D
& rSource
, double fTransparency
);
67 tryDrawPolygonHairlinePrimitive2DDirect(const primitive2d::PolygonHairlinePrimitive2D
& rSource
,
68 double fTransparency
);
69 bool tryDrawPolygonStrokePrimitive2DDirect(const primitive2d::PolygonStrokePrimitive2D
& rSource
,
70 double fTransparency
);
73 processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D
& rWrongSpellPrimitive
);
74 void processTextSimplePortionPrimitive2D(
75 const primitive2d::TextSimplePortionPrimitive2D
& rCandidate
);
76 void processTextDecoratedPortionPrimitive2D(
77 const primitive2d::TextSimplePortionPrimitive2D
& rCandidate
);
78 void processPolygonHairlinePrimitive2D(
79 const primitive2d::PolygonHairlinePrimitive2D
& rPolygonHairlinePrimitive2D
);
80 void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D
& rBitmapCandidate
);
81 void processPolyPolygonGradientPrimitive2D(
82 const primitive2d::PolyPolygonGradientPrimitive2D
& rPolygonCandidate
);
83 void processPolyPolygonColorPrimitive2D(
84 const primitive2d::PolyPolygonColorPrimitive2D
& rPolyPolygonColorPrimitive2D
);
85 void processUnifiedTransparencePrimitive2D(
86 const primitive2d::UnifiedTransparencePrimitive2D
& rUniTransparenceCandidate
);
87 void processControlPrimitive2D(const primitive2d::ControlPrimitive2D
& rControlPrimitive
);
88 void processPolygonStrokePrimitive2D(
89 const primitive2d::PolygonStrokePrimitive2D
& rPolygonStrokePrimitive2D
);
90 void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D
& rFillHatchPrimitive
);
92 processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D
& rPrimitive
);
94 processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D
& rBorder
);
95 void processInvertPrimitive2D(const primitive2d::BasePrimitive2D
& rCandidate
);
96 void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D
& rCandidate
);
97 void processFillGradientPrimitive2D(const primitive2d::FillGradientPrimitive2D
& rPrimitive
);
98 void processPatternFillPrimitive2D(const primitive2d::PatternFillPrimitive2D
& rPrimitive
);
101 /// constructor/destructor
102 VclPixelProcessor2D(const geometry::ViewInformation2D
& rViewInformation
, OutputDevice
& rOutDev
,
103 const basegfx::BColorModifierStack
& rInitStack
104 = basegfx::BColorModifierStack());
105 virtual ~VclPixelProcessor2D() override
;
107 } // end of namespace drawinglayer::processor2d
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */