tdf#154546 skip dispatch when presenter controller is not set
[LibreOffice.git] / include / drawinglayer / primitive2d / PolyPolygonGraphicPrimitive2D.hxx
blobe6c9c0f7538cbb9151595712bfaab60309e21e02
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/drawinglayerdllapi.h>
24 #include <drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx>
25 #include <basegfx/polygon/b2dpolypolygon.hxx>
26 #include <drawinglayer/attribute/fillgraphicattribute.hxx>
28 namespace drawinglayer::primitive2d
30 /** PolyPolygonGraphicPrimitive2D class
32 This primitive defines a tools::PolyPolygon filled with bitmap data
33 (including transparence). The decomosition will create a MaskPrimitive2D
34 containing a FillGraphicPrimitive2D.
36 class DRAWINGLAYER_DLLPUBLIC PolyPolygonGraphicPrimitive2D final
37 : public BufferedDecompositionPrimitive2D
39 private:
40 /// the tools::PolyPolygon geometry
41 basegfx::B2DPolyPolygon maPolyPolygon;
43 /// the definition range
44 basegfx::B2DRange maDefinitionRange;
46 /// the bitmap fill definition (may include tiling)
47 attribute::FillGraphicAttribute maFillGraphic;
49 /// local decomposition.
50 virtual void
51 create2DDecomposition(Primitive2DContainer& rContainer,
52 const geometry::ViewInformation2D& rViewInformation) const override;
54 public:
55 PolyPolygonGraphicPrimitive2D(basegfx::B2DPolyPolygon aPolyPolygon,
56 const basegfx::B2DRange& rDefinitionRange,
57 const attribute::FillGraphicAttribute& rFillGraphic);
59 /// data read access
60 const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
61 const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
62 const attribute::FillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
64 /// compare operator
65 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
67 /// provide unique ID
68 virtual sal_uInt32 getPrimitive2DID() const override;
71 } // end of namespace primitive2d::drawinglayer
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */