LibreOffice Module drawinglayer (master) 1
fillgradientprimitive2d.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
23
26
27
28// predefines
29
30namespace basegfx { class B2DPolygon; }
31
32
33// FillGradientPrimitive2D class
34
36{
52 {
53 private:
56
60
63
64
65 protected:
67 void createFill(Primitive2DContainer& rContainer, bool bOverlapping) const;
68
70 virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
71
72 public:
74 basegfx::B2DPolygon getUnitPolygon() const;
75 basegfx::BColor getOuterColor() const;
76 void generateMatricesAndColors(
77 std::function<void(const basegfx::B2DHomMatrix& rMatrix, const basegfx::BColor& rColor)> aCallback) const;
78
81 const basegfx::B2DRange& rOutputRange,
84 const basegfx::B2DRange& rOutputRange,
85 const basegfx::B2DRange& rDefinitionRange,
87
89 const basegfx::B2DRange& getOutputRange() const { return maOutputRange; }
90 const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
91 const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
92
94 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
95
97 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
98
100 virtual sal_uInt32 getPrimitive2DID() const override;
101 };
102} // end of namespace drawinglayer::primitive2d
103
104
105/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
attribute::FillGradientAttribute maFillGradient
the gradient definition
basegfx::B2DRange maOutputRange
the geometrically visible area
const basegfx::B2DRange & getOutputRange() const
data read access
basegfx::B2DRange maDefinitionRange
the area the gradient definition is based on in the simplest case identical to OutputRange
const attribute::FillGradientAttribute & getFillGradient() const
#define DRAWINGLAYER_DLLPUBLIC
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)