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 .
19 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
20 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
22 #include <drawinglayer/drawinglayerdllapi.h>
23 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
24 #include <svtools/grfmgr.hxx>
33 namespace drawinglayer
37 /** Helper method with supports decomposing a Graphic with all
38 possible contents to lower level primitives.
40 #i121194# Unified to use this helper for FillGraphicPrimitive2D
41 and GraphicPrimitive2D at the same time. It is able to handle
42 Bitmaps (with the sub-categories animated bitmap, and SVG),
45 Primitive2DSequence
create2DDecompositionOfGraphic(
46 const Graphic
& rGraphic
,
47 const basegfx::B2DHomMatrix
& rTransform
);
49 /** Helper to embed given sequence of primitives to evtl. a stack
50 of ModifiedColorPrimitive2D's to get all the needed modifications
53 Primitive2DSequence
create2DColorModifierEmbeddingsAsNeeded(
54 const Primitive2DSequence
& rChildren
,
55 GraphicDrawMode aGraphicDrawMode
= GRAPHICDRAWMODE_STANDARD
,
56 double fLuminance
= 0.0, // [-1.0 .. 1.0]
57 double fContrast
= 0.0, // [-1.0 .. 1.0]
58 double fRed
= 0.0, // [-1.0 .. 1.0]
59 double fGreen
= 0.0, // [-1.0 .. 1.0]
60 double fBlue
= 0.0, // [-1.0 .. 1.0]
61 double fGamma
= 1.0, // ]0.0 .. 10.0]
62 bool bInvert
= false);
64 } // end of namespace primitive2d
65 } // end of namespace drawinglayer
69 #endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GRAPHICPRIMITIVEHELPER2D_HXX
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */