Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / drawinglayer / inc / primitive2d / graphicprimitivehelper2d.hxx
blobcecb1d8f156472e24f172099bd2234c51d89a704
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/primitive2d/Primitive2DContainer.hxx>
23 #include <vcl/GraphicAttributes.hxx>
25 class Graphic;
27 namespace drawinglayer::primitive2d
29 /** Helper method with supports decomposing a Graphic with all
30 possible contents to lower level primitives.
32 #i121194# Unified to use this helper for FillGraphicPrimitive2D
33 and GraphicPrimitive2D at the same time. It is able to handle
34 Bitmaps (with the sub-categories animated bitmap, and SVG),
35 and Metafiles.
37 void create2DDecompositionOfGraphic(
38 Primitive2DContainer& rContainer,
39 const Graphic& rGraphic,
40 const basegfx::B2DHomMatrix& rTransform);
42 /** Helper to embed given sequence of primitives to evtl. a stack
43 of ModifiedColorPrimitive2D's to get all the needed modifications
44 applied.
46 Primitive2DContainer create2DColorModifierEmbeddingsAsNeeded(
47 Primitive2DContainer&& rChildren,
48 GraphicDrawMode aGraphicDrawMode,
49 double fLuminance = 0.0, // [-1.0 .. 1.0]
50 double fContrast = 0.0, // [-1.0 .. 1.0]
51 double fRed = 0.0, // [-1.0 .. 1.0]
52 double fGreen = 0.0, // [-1.0 .. 1.0]
53 double fBlue = 0.0, // [-1.0 .. 1.0]
54 double fGamma = 1.0, // ]0.0 .. 10.0]
55 bool bInvert = false);
57 } // end of namespace drawinglayer::primitive2d
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */