1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
23 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
24 
25 #include <drawinglayer/drawinglayerdllapi.h>
26 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
27 #include <svtools/grfmgr.hxx>
28 
29 //////////////////////////////////////////////////////////////////////////////
30 // predefines
31 
32 class Graphic;
33 
34 //////////////////////////////////////////////////////////////////////////////
35 
36 namespace drawinglayer
37 {
38 	namespace primitive2d
39 	{
40         /** Helper method with supports decomposing a Graphic with all
41             possible contents to lower level primitives.
42 
43             #121194# Unified to use this helper for FillGraphicPrimitive2D
44             and GraphicPrimitive2D at the same time. It is able to handle
45             Bitmaps (with the sub-categories animated bitmap, and SVG),
46             and Metafiles.
47          */
48         Primitive2DSequence create2DDecompositionOfGraphic(
49             const Graphic& rGraphic,
50             const basegfx::B2DHomMatrix& rTransform);
51 
52         /** Helper to embed given sequence of primitives to evtl. a stack
53             of ModifiedColorPrimitive2D's to get all the needed modifications
54             applied.
55         */
56         Primitive2DSequence create2DColorModifierEmbeddingsAsNeeded(
57             const Primitive2DSequence& rChildren,
58             GraphicDrawMode aGraphicDrawMode = GRAPHICDRAWMODE_STANDARD,
59             double fLuminance = 0.0,        // [-1.0 .. 1.0]
60             double fContrast = 0.0,         // [-1.0 .. 1.0]
61             double fRed = 0.0,              // [-1.0 .. 1.0]
62             double fGreen = 0.0,            // [-1.0 .. 1.0]
63             double fBlue = 0.0,             // [-1.0 .. 1.0]
64             double fGamma = 1.0,            // ]0.0 .. 10.0]
65             bool bInvert = false);
66 
67     } // end of namespace primitive2d
68 } // end of namespace drawinglayer
69 
70 //////////////////////////////////////////////////////////////////////////////
71 
72 #endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
73 
74 //////////////////////////////////////////////////////////////////////////////
75 // eof
76