LibreOffice Module drawinglayer (master)
1
drawinglayer
source
primitive3d
shadowprimitive3d.cxx
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
#include <
primitive3d/shadowprimitive3d.hxx
>
21
#include <
drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx
>
22
#include <utility>
23
24
25
using namespace
com::sun::star
;
26
27
28
namespace
drawinglayer::primitive3d
29
{
30
ShadowPrimitive3D::ShadowPrimitive3D
(
31
basegfx::B2DHomMatrix
aShadowTransform,
32
const
basegfx::BColor
& rShadowColor,
33
double
fShadowTransparence,
34
bool
bShadow3D,
35
const
Primitive3DContainer
& rChildren)
36
:
GroupPrimitive3D
(rChildren),
37
maShadowTransform(
std
::move(aShadowTransform)),
38
maShadowColor
(rShadowColor),
39
mfShadowTransparence(fShadowTransparence),
40
mbShadow3D(bShadow3D)
41
{
42
}
43
44
bool
ShadowPrimitive3D::operator==
(
const
BasePrimitive3D
& rPrimitive)
const
45
{
46
if
(GroupPrimitive3D::operator==(rPrimitive))
47
{
48
const
ShadowPrimitive3D
& rCompare =
static_cast<
const
ShadowPrimitive3D
&
>
(rPrimitive);
49
50
return
(
getShadowTransform
() == rCompare.
getShadowTransform
()
51
&&
getShadowColor
() == rCompare.
getShadowColor
()
52
&&
getShadowTransparence
() == rCompare.
getShadowTransparence
()
53
&&
getShadow3D
() == rCompare.
getShadow3D
());
54
}
55
56
return
false
;
57
}
58
59
// provide unique ID
60
ImplPrimitive3DIDBlock
(
ShadowPrimitive3D
,
PRIMITIVE3D_ID_SHADOWPRIMITIVE3D
)
61
62
}
// end of namespace
63
64
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basegfx::B2DHomMatrix
basegfx::BColor
drawinglayer::primitive3d::BasePrimitive3D
BasePrimitive3D class.
Definition:
baseprimitive3d.hxx:97
drawinglayer::primitive3d::GroupPrimitive3D
GroupPrimitive3D class.
Definition:
groupprimitive3d.hxx:50
drawinglayer::primitive3d::Primitive3DContainer
Definition:
baseprimitive3d.hxx:57
drawinglayer::primitive3d::ShadowPrimitive3D
ShadowPrimitive3D class.
Definition:
shadowprimitive3d.hxx:40
drawinglayer::primitive3d::ShadowPrimitive3D::getShadowColor
const basegfx::BColor & getShadowColor() const
Definition:
shadowprimitive3d.hxx:59
drawinglayer::primitive3d::ShadowPrimitive3D::operator==
virtual bool operator==(const BasePrimitive3D &rPrimitive) const override
compare operator
Definition:
shadowprimitive3d.cxx:44
drawinglayer::primitive3d::ShadowPrimitive3D::getShadow3D
bool getShadow3D() const
Definition:
shadowprimitive3d.hxx:61
drawinglayer::primitive3d::ShadowPrimitive3D::getShadowTransform
const basegfx::B2DHomMatrix & getShadowTransform() const
data read access
Definition:
shadowprimitive3d.hxx:58
drawinglayer::primitive3d::ShadowPrimitive3D::ShadowPrimitive3D
ShadowPrimitive3D(basegfx::B2DHomMatrix aShadowTransform, const basegfx::BColor &rShadowColor, double fShadowTransparence, bool bShadow3D, const Primitive3DContainer &rChildren)
constructor
Definition:
shadowprimitive3d.cxx:30
drawinglayer::primitive3d::ShadowPrimitive3D::getShadowTransparence
double getShadowTransparence() const
Definition:
shadowprimitive3d.hxx:60
drawinglayer_primitivetypes3d.hxx
PRIMITIVE3D_ID_SHADOWPRIMITIVE3D
#define PRIMITIVE3D_ID_SHADOWPRIMITIVE3D
Definition:
drawinglayer_primitivetypes3d.hxx:43
com::sun::star
drawinglayer::primitive3d
SdrPrimitive3D class.
Definition:
baseprimitive3d.cxx:30
drawinglayer::primitive3d::ImplPrimitive3DIDBlock
ImplPrimitive3DIDBlock(PolygonHairlinePrimitive3D, PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D) Primitive3DContainer PolygonStrokePrimitive3D
Definition:
polygonprimitive3d.cxx:60
std
shadowprimitive3d.hxx
maShadowColor
const ::Color maShadowColor
Generated on Sun Jul 30 2023 04:42:54 for LibreOffice Module drawinglayer (master) by
1.9.3