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 .
20 #ifndef INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
21 #define INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include "vclprocessor2d.hxx"
26 #include <vcl/outdev.hxx>
33 namespace drawinglayer
{ namespace primitive2d
{
34 class PolyPolygonColorPrimitive2D
;
35 class PolygonHairlinePrimitive2D
;
36 class PolygonStrokePrimitive2D
;
37 class WrongSpellPrimitive2D
;
38 class TextSimplePortionPrimitive
;
39 class BitmapPrimitive2D
;
40 class PolyPolygonGradientPrimitive2D
;
41 class UnifiedTransparencePrimitive2D
;
42 class ControlPrimitive2D
;
43 class PolygonStrokePrimitive2D
;
44 class FillHatchPrimitive2D
;
45 class BackgroundColorPrimitive2D
;
46 class BorderLinePrimitive2D
;
49 namespace drawinglayer
53 /** VclPixelProcessor2D class
55 This processor derived from VclProcessor2D is the base class for rendering
56 all feeded primitives to a VCL Window. It is the currently used renderer
57 for all VCL editing output from the DrawingLayer.
59 class VclPixelProcessor2D final
: public VclProcessor2D
62 std::unique_ptr
<Impl
> m_pImpl
;
64 /* the local processor for BasePrimitive2D-Implementation based primitives,
65 called from the common process()-implementation
67 virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D
& rCandidate
) override
;
69 // some helpers to try direct paints (shortcuts)
70 void tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D
& rSource
, double fTransparency
);
71 bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D
& rSource
, double fTransparency
);
72 bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D
& rSource
, double fTransparency
);
74 void processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D
& rWrongSpellPrimitive
);
75 void processTextSimplePortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D
& rCandidate
);
76 void processTextDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D
& rCandidate
);
77 void processPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D
& rPolygonHairlinePrimitive2D
);
78 void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D
& rBitmapCandidate
);
79 void processPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D
& rPolygonCandidate
);
80 void processPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D
& rPolyPolygonColorPrimitive2D
);
81 void processUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D
& rUniTransparenceCandidate
);
82 void processControlPrimitive2D(const primitive2d::ControlPrimitive2D
& rControlPrimitive
);
83 void processPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D
& rPolygonStrokePrimitive2D
);
84 void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D
& rFillHatchPrimitive
);
85 void processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D
& rPrimitive
);
86 void processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D
& rBorder
);
87 void processInvertPrimitive2D(const primitive2d::BasePrimitive2D
& rCandidate
);
88 void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D
& rCandidate
);
91 /// constructor/destructor
93 const geometry::ViewInformation2D
& rViewInformation
,
94 OutputDevice
& rOutDev
);
95 virtual ~VclPixelProcessor2D() override
;
97 } // end of namespace processor2d
98 } // end of namespace drawinglayer
101 #endif // INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */