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 BorderLinePrimitive2D
;
41 namespace drawinglayer
45 /** VclPixelProcessor2D class
47 This processor derived from VclProcessor2D is the base class for rendering
48 all feeded primitives to a VCL Window. It is the currently used renderer
49 for all VCL editing output from the DrawingLayer.
51 class VclPixelProcessor2D
: public VclProcessor2D
55 std::unique_ptr
<Impl
> m_pImpl
;
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 bool tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D
& rSource
, double fTransparency
);
65 bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D
& rSource
, double fTransparency
);
66 bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D
& rSource
, double fTransparency
);
67 bool tryDrawBorderLinePrimitive2DDirect(const drawinglayer::primitive2d::BorderLinePrimitive2D
& rSource
);
70 /// constructor/destructor
72 const geometry::ViewInformation2D
& rViewInformation
,
73 OutputDevice
& rOutDev
);
74 virtual ~VclPixelProcessor2D();
76 } // end of namespace processor2d
77 } // end of namespace drawinglayer
80 #endif // INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */