nss: upgrade to release 3.73
[LibreOffice.git] / drawinglayer / source / processor2d / vclpixelprocessor2d.hxx
blob480fdcaa6e183660eedb3862ed6aa89e1a13257a
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 "vclprocessor2d.hxx"
23 #include <vcl/outdev.hxx>
25 #include <memory>
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 GlowPrimitive2D;
43 class ShadowPrimitive2D;
44 class SoftEdgePrimitive2D;
45 class FillGradientPrimitive2D;
48 namespace drawinglayer::processor2d
50 /** VclPixelProcessor2D class
52 This processor derived from VclProcessor2D is the base class for rendering
53 all fed primitives to a VCL Window. It is the currently used renderer
54 for all VCL editing output from the DrawingLayer.
56 class VclPixelProcessor2D final : public VclProcessor2D
58 struct Impl;
59 std::unique_ptr<Impl> m_pImpl;
61 /* the local processor for BasePrimitive2D-Implementation based primitives,
62 called from the common process()-implementation
64 virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
66 // some helpers to try direct paints (shortcuts)
67 void tryDrawPolyPolygonColorPrimitive2DDirect(
68 const primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
69 bool
70 tryDrawPolygonHairlinePrimitive2DDirect(const primitive2d::PolygonHairlinePrimitive2D& rSource,
71 double fTransparency);
72 bool tryDrawPolygonStrokePrimitive2DDirect(const primitive2d::PolygonStrokePrimitive2D& rSource,
73 double fTransparency);
75 void
76 processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive);
77 void processTextSimplePortionPrimitive2D(
78 const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
79 void processTextDecoratedPortionPrimitive2D(
80 const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
81 void processPolygonHairlinePrimitive2D(
82 const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D);
83 void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
84 void processPolyPolygonGradientPrimitive2D(
85 const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
86 void processPolyPolygonColorPrimitive2D(
87 const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D);
88 void processUnifiedTransparencePrimitive2D(
89 const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
90 void processControlPrimitive2D(const primitive2d::ControlPrimitive2D& rControlPrimitive);
91 void processPolygonStrokePrimitive2D(
92 const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D);
93 void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive);
94 void
95 processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D& rPrimitive);
96 void
97 processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
98 void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
99 void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
100 void processGlowPrimitive2D(const primitive2d::GlowPrimitive2D& rCandidate);
101 void processSoftEdgePrimitive2D(const primitive2d::SoftEdgePrimitive2D& rCandidate);
102 void processShadowPrimitive2D(const primitive2d::ShadowPrimitive2D& rCandidate);
103 void processFillGradientPrimitive2D(const primitive2d::FillGradientPrimitive2D& rPrimitive);
105 public:
106 /// constructor/destructor
107 VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev,
108 const basegfx::BColorModifierStack& rInitStack
109 = basegfx::BColorModifierStack());
110 virtual ~VclPixelProcessor2D() override;
112 } // end of namespace drawinglayer::processor2d
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */