LibreOffice Module drawinglayer (master) 1
sceneprimitive2d.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
28#include <vcl/bitmapex.hxx>
31
33{
51 {
52 private:
55
58
61
64
67
70
75
80
85
87 bool impGetShadow3D() const;
88 void calculateDiscreteSizes(
89 const geometry::ViewInformation2D& rViewInformation,
90 basegfx::B2DRange& rDiscreteRange,
91 basegfx::B2DRange& rVisibleDiscreteRange,
92 basegfx::B2DRange& rUnitVisibleRange) const;
93
95 virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
96
97 public:
99
103 Primitive2DContainer getGeometry2D() const;
104 Primitive2DContainer getShadow2D() const;
105
115 bool tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const;
116
120 attribute::SdrSceneAttribute aSdrSceneAttribute,
121 attribute::SdrLightingAttribute aSdrLightingAttribute,
122 basegfx::B2DHomMatrix aObjectTransformation,
123 geometry::ViewInformation3D aViewInformation3D);
124
126 const primitive3d::Primitive3DContainer& getChildren3D() const { return mxChildren3D; }
127 const attribute::SdrSceneAttribute& getSdrSceneAttribute() const { return maSdrSceneAttribute; }
128 const attribute::SdrLightingAttribute& getSdrLightingAttribute() const { return maSdrLightingAttribute; }
129 const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
130 const geometry::ViewInformation3D& getViewInformation3D() const { return maViewInformation3D; }
131
133 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
134
136 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
137
139 virtual sal_uInt32 getPrimitive2DID() const override;
140
142 virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
143 };
144} // end of namespace drawinglayer::primitive2d
145
146
147/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const attribute::SdrSceneAttribute & getSdrSceneAttribute() const
const geometry::ViewInformation3D & getViewInformation3D() const
attribute::SdrLightingAttribute maSdrLightingAttribute
lighting attribute set
const primitive3d::Primitive3DContainer & getChildren3D() const
data read access
basegfx::B2DHomMatrix maObjectTransformation
object transformation for scene for 2D definition
BitmapEx maOldRenderedBitmap
the last created BitmapEx, e.g.
bool mbShadow3DChecked
flag if given 3D geometry is already checked for shadow definitions and 2d shadows are created in maS...
Primitive2DContainer maShadowPrimitives
the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
geometry::ViewInformation3D maViewInformation3D
scene transformation set and object transformation
const basegfx::B2DHomMatrix & getObjectTransformation() const
double mfOldDiscreteSizeX
the last used NewDiscreteSize and NewUnitVisiblePart definitions for decomposition
primitive3d::Primitive3DContainer mxChildren3D
the 3D geometry definition
const attribute::SdrLightingAttribute & getSdrLightingAttribute() const
attribute::SdrSceneAttribute maSdrSceneAttribute
3D scene attribute set
#define DRAWINGLAYER_DLLPUBLIC
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)