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