LibreOffice Module svx (master) 1
sdrframeborderprimitive2d.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_SDRFRAMEBORDERPRIMITIVE2D_HXX
21#define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRFRAMEBORDERPRIMITIVE2D_HXX
22
24#include <svx/framelink.hxx>
25
26#include <memory>
27
28// predefines
29
31 {
33 {
34 private:
40
42 {
43 private:
47
48 public:
50 const svx::frame::Style& rStyle,
51 const basegfx::B2DVector& rNormalizedPerpendicular,
52 bool bStyleMirrored);
53
54 const svx::frame::Style& getStyle() const { return maStyle; }
55 const basegfx::B2DVector& getNormalizedPerpendicular() const { return maNormalizedPerpendicular; }
56 bool getStyleMirrored() const { return mbStyleMirrored; }
57 bool operator==(const SdrConnectStyleData& rCompare) const;
58 };
59
60 std::vector<SdrConnectStyleData> maStart;
61 std::vector<SdrConnectStyleData> maEnd;
62
63 public:
65 const basegfx::B2DPoint& rOrigin,
66 const basegfx::B2DVector& rX,
67 const svx::frame::Style& rStyle,
68 const Color* pForceColor);
69
70 void addSdrConnectStyleData(
71 bool bStart,
72 const svx::frame::Style& rStyle,
73 const basegfx::B2DVector& rNormalizedPerpendicular,
74 bool bStyleMirrored);
75
76 void create2DDecomposition(
77 Primitive2DContainer& rContainer,
78 double fMinDiscreteUnit) const;
79
80 double getMinimalNonZeroBorderWidth() const;
81 bool operator==(const SdrFrameBorderData& rCompare) const;
82 };
83
84 typedef std::vector<SdrFrameBorderData> SdrFrameBorderDataVector;
85
86} // end of namespace drawinglayer::primitive2d
87
89 {
91 {
92 private:
93 std::shared_ptr<SdrFrameBorderDataVector> maFrameBorders;
97
98 // local decomposition.
99 virtual void create2DDecomposition(
100 Primitive2DContainer& rContainer,
101 const geometry::ViewInformation2D& aViewInformation) const override;
102
103 public:
105 std::shared_ptr<SdrFrameBorderDataVector>& rFrameBorders,
106 bool bForceToSingleDiscreteUnit);
107
108 // compare operator
109 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
110
111 // override to get view-dependent
112 virtual void get2DDecomposition(
114 const geometry::ViewInformation2D& rViewInformation) const override;
115
116 // data access
117 const std::shared_ptr<SdrFrameBorderDataVector>& getFrameBorders() const { return maFrameBorders; }
118 bool doForceToSingleDiscreteUnit() const { return mbForceToSingleDiscreteUnit; }
119
120 // provide unique ID
121 virtual sal_uInt32 getPrimitive2DID() const override;
122 };
123
124} // end of namespace drawinglayer::primitive2d
125
126
127#endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRFRAMEBORDERPRIMITIVE2D_HXX
128
129/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basegfx::B2DVector maX
start point of borderline
svx::frame::Style maStyle
X-Axis of borderline with length.
std::shared_ptr< SdrFrameBorderDataVector > maFrameBorders
const std::shared_ptr< SdrFrameBorderDataVector > & getFrameBorders() const
Contains the widths of primary and secondary line of a frame style.
Definition: framelink.hxx:99
std::vector< SdrFrameBorderData > SdrFrameBorderDataVector
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)