LibreOffice Module svx (master) 1
sdrmeasureprimitive2d.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#ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX
21#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX
22
25
26
27// predefines
28
31 {
36 };
37}
38
40 class SdrLineAttribute;
41}
42
43
45 {
47 {
48 private:
54 double mfDistance;
55 double mfUpper;
56 double mfLower;
59
60 bool mbBelow : 1;
63
64 // internal decomposition helper
66 const attribute::SdrLineAttribute& rLineAttribute,
67 const basegfx::B2DHomMatrix& rObjectMatrix,
68 const basegfx::B2DPoint& rStart,
69 const basegfx::B2DPoint& rEnd,
70 bool bLeftActive,
71 bool bRightActive) const;
72
73 // local decomposition.
74 virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override;
75
76 public:
78 const attribute::SdrLineEffectsTextAttribute& rSdrLSTAttribute,
79 const basegfx::B2DPoint& rStart,
80 const basegfx::B2DPoint& rEnd,
81 MeasureTextPosition eHorizontal,
82 MeasureTextPosition eVertical,
83 double fDistance,
84 double fUpper,
85 double fLower,
86 double fLeftDelta,
87 double fRightDelta,
88 bool bBelow,
89 bool bTextRotation,
90 bool bTextAutoAngle);
91
92 // data access
94 const basegfx::B2DPoint& getStart() const { return maStart; }
95 const basegfx::B2DPoint& getEnd() const { return maEnd; }
98 double getDistance() const { return mfDistance; }
99 double getUpper() const { return mfUpper; }
100 double getLower() const { return mfLower; }
101 double getLeftDelta() const { return mfLeftDelta; }
102 double getRightDelta() const { return mfRightDelta; }
103 bool getBelow() const { return mbBelow; }
104 bool getTextRotation() const { return mbTextRotation; }
105 bool getTextAutoAngle() const { return mbTextAutoAngle; }
106
107 // compare operator
108 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
109
110 // provide unique ID
111 virtual sal_uInt32 getPrimitive2DID() const override;
112 };
113} // end of namespace drawinglayer::primitive2d
114
115
116#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRMEASUREPRIMITIVE2D_HXX
117
118/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &aViewInformation) const override
SdrMeasurePrimitive2D(const attribute::SdrLineEffectsTextAttribute &rSdrLSTAttribute, const basegfx::B2DPoint &rStart, const basegfx::B2DPoint &rEnd, MeasureTextPosition eHorizontal, MeasureTextPosition eVertical, double fDistance, double fUpper, double fLower, double fLeftDelta, double fRightDelta, bool bBelow, bool bTextRotation, bool bTextAutoAngle)
virtual sal_uInt32 getPrimitive2DID() const override
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
const attribute::SdrLineEffectsTextAttribute & getSdrLSTAttribute() const
Primitive2DReference impCreatePart(const attribute::SdrLineAttribute &rLineAttribute, const basegfx::B2DHomMatrix &rObjectMatrix, const basegfx::B2DPoint &rStart, const basegfx::B2DPoint &rEnd, bool bLeftActive, bool bRightActive) const
attribute::SdrLineEffectsTextAttribute maSdrLSTAttribute