update credits
[LibreOffice.git] / include / drawinglayer / primitive2d / modifiedcolorprimitive2d.hxx
blob4dc0371d23c80bf496a6c59760e8f06a72f05c78
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_MODIFIEDCOLORPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MODIFIEDCOLORPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
26 #include <basegfx/color/bcolormodifier.hxx>
28 //////////////////////////////////////////////////////////////////////////////
30 namespace drawinglayer
32 namespace primitive2d
34 /** ModifiedColorPrimitive2D class
36 This primitive is a grouping primitive and allows to define
37 how the colors of it's child content shall be modified for
38 visualisation. This can be (and is) used e.g. for generic shadow
39 visualisation by forcing all color usages of the contained
40 sub-content to the shadow color.
42 For the possibilities of color modifications, please refer
43 to the basegfx::BColorModifier definitions in basegfx. For
44 processing there is tooling in basegfx to build a stack of
45 BColorModifiers to always be able to proccess the correct
46 colors.
48 If a renderer does not handle this primitive, the content will
49 be visualized unchanged.
51 class DRAWINGLAYER_DLLPUBLIC ModifiedColorPrimitive2D : public GroupPrimitive2D
53 private:
54 /// The ColorModifier to use
55 basegfx::BColorModifier maColorModifier;
57 public:
58 /// constructor
59 ModifiedColorPrimitive2D(
60 const Primitive2DSequence& rChildren,
61 const basegfx::BColorModifier& rColorModifier);
63 /// data read access
64 const basegfx::BColorModifier& getColorModifier() const { return maColorModifier; }
66 /// compare operator
67 virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
69 /// provide unique ID
70 DeclPrimitive2DIDBlock()
72 } // end of namespace primitive2d
73 } // end of namespace drawinglayer
75 //////////////////////////////////////////////////////////////////////////////
77 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MODIFIEDCOLORPRIMITIVE2D_HXX
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */