update emoji autocorrect entries from po-files
[LibreOffice.git] / include / drawinglayer / primitive3d / polygontubeprimitive3d.hxx
blobcfd092c1d8ae879e7938831861118389b77f3b03
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 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYGONTUBEPRIMITIVE3D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYGONTUBEPRIMITIVE3D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive3d/polygonprimitive3d.hxx>
28 // predefines
30 namespace basegfx {
31 class B3DPolyPolygon;
32 class B3DHomMatrix;
37 namespace drawinglayer
39 namespace primitive3d
41 /** PolygonStrokePrimitive3D class
43 This 3D primitive extends a 3D hairline to a 3D tube which is
44 e.g. used for fat lines in 3D. It's decomposition will create all
45 3D objects needed for the line tubes and the edge roundings
46 in full 3D.
48 class DRAWINGLAYER_DLLPUBLIC PolygonTubePrimitive3D : public PolygonHairlinePrimitive3D
50 private:
51 /// hold the last decompositon since it's expensive
52 Primitive3DSequence maLast3DDecomposition;
54 /// visualisation parameters
55 double mfRadius;
56 double mfDegreeStepWidth;
57 double mfMiterMinimumAngle;
58 basegfx::B2DLineJoin maLineJoin;
59 com::sun::star::drawing::LineCap maLineCap;
61 protected:
62 /** access methods to maLast3DDecomposition. The usage of this methods may allow
63 later thread-safe stuff to be added if needed. Only to be used by getDecomposition()
64 implementations for buffering the last decomposition.
66 const Primitive3DSequence& getLast3DDecomposition() const { return maLast3DDecomposition; }
67 void setLast3DDecomposition(const Primitive3DSequence& rNew) { maLast3DDecomposition = rNew; }
69 /// local decomposition.
70 Primitive3DSequence impCreate3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
72 public:
73 /// constructor
74 PolygonTubePrimitive3D(
75 const basegfx::B3DPolygon& rPolygon,
76 const basegfx::BColor& rBColor,
77 double fRadius,
78 basegfx::B2DLineJoin aLineJoin,
79 com::sun::star::drawing::LineCap aLineCap,
80 double fDegreeStepWidth = 10.0 * F_PI180,
81 double fMiterMinimumAngle = 15.0 * F_PI180);
83 /// data read access
84 double getRadius() const { return mfRadius; }
85 double getDegreeStepWidth() const { return mfDegreeStepWidth; }
86 double getMiterMinimumAngle() const { return mfMiterMinimumAngle; }
87 basegfx::B2DLineJoin getLineJoin() const { return maLineJoin; }
88 com::sun::star::drawing::LineCap getLineCap() const { return maLineCap; }
90 /// compare operator
91 virtual bool operator==(const BasePrimitive3D& rPrimitive) const SAL_OVERRIDE;
93 /** local decomposition. Use own buffering since we are not derived from
94 BufferedDecompositionPrimitive3D
96 virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const SAL_OVERRIDE;
98 /// provide unique ID
99 DeclPrimitive3DIDBlock()
101 } // end of namespace primitive3d
102 } // end of namespace drawinglayer
106 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYGONTUBEPRIMITIVE3D_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */