build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / include / drawinglayer / primitive2d / unifiedtransparenceprimitive2d.hxx
blobe24f8f3a5474b245718377a49d0cbe19bf213d82
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 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
28 namespace drawinglayer
30 namespace primitive2d
32 /** UnifiedTransparencePrimitive2D class
34 This primitive encapsualtes a child hierarchy and defines
35 that it shall be visualized with the given transparency. That
36 transparency is unique for all contained geometry, so that
37 e.g. overlapping polygons in the child geometry will not show
38 regions of combined transparency, but be all rendered with the
39 defined, single transparency.
41 class DRAWINGLAYER_DLLPUBLIC UnifiedTransparencePrimitive2D : public GroupPrimitive2D
43 private:
44 /// the unified transparence
45 double mfTransparence;
47 public:
48 /// constructor
49 UnifiedTransparencePrimitive2D(
50 const Primitive2DContainer& rChildren,
51 double fTransparence);
53 /// data read access
54 double getTransparence() const { return mfTransparence; }
56 /// compare operator
57 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
59 /// own getB2DRange implementation to include transparent geometries to BoundRect calculations
60 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
62 /// create decomposition
63 virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
65 /// provide unique ID
66 DeclPrimitive2DIDBlock()
68 } // end of namespace primitive2d
69 } // end of namespace drawinglayer
72 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */