19#ifndef INCLUDED_TOOLS_POLY_HXX
20#define INCLUDED_TOOLS_POLY_HXX
22#include <rtl/ustring.hxx>
31#define POLY_APPEND (0xFFFF)
32#define POLYPOLY_APPEND (0xFFFF)
80 static void ImplReduceEdges(
tools::Polygon& rPoly,
const double& rArea, sal_uInt16 nPercent );
82 void ImplWrite(
SvStream& rOStream )
const;
86 explicit Polygon( sal_uInt16 nSize );
91 sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
97 const bool bClockWiseArcDirection =
false);
100 sal_uInt16 nPoints );
106 void SetPoint(
const Point& rPt, sal_uInt16 nPos );
107 const Point& GetPoint( sal_uInt16 nPos )
const;
110 PolyFlags GetFlags( sal_uInt16 nPos )
const;
111 bool HasFlags()
const;
115 void SetSize( sal_uInt16 nNewSize );
116 sal_uInt16 GetSize()
const;
121 bool Contains(
const Point& rPt )
const;
122 double CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 )
const;
144 void AdaptiveSubdivide(
tools::Polygon& rResult,
const double d = 1.0 )
const;
149 void Scale(
double fScaleX,
double fScaleY );
150 void Rotate(
const Point& rCenter,
double fSin,
double fCos );
157 Point& operator[]( sal_uInt16 nPos );
174 Point * GetPointAry();
175 const Point* GetConstPointAry()
const;
176 const PolyFlags* GetConstFlagAry()
const;
183 explicit Polygon(const ::basegfx::B2DPolygon& rPolygon);
207 void Remove( sal_uInt16 nPos );
215 sal_uInt16
Count()
const;
241 void Scale(
double fScaleX,
double fScaleY );
242 void Rotate(
const Point& rCenter,
double fSin,
double fCos );
265 explicit PolyPolygon(const ::basegfx::B2DPolyPolygon& rPolyPolygon);
268template<
typename charT,
typename traits >
269inline std::basic_ostream<charT, traits> &
operator <<(
270 std::basic_ostream<charT, traits> & stream,
const Polygon& poly )
273 for (sal_uInt16 i = 0;
i < poly.
GetSize();
i++)
295template<
typename charT,
typename traits >
296inline std::basic_ostream<charT, traits> &
operator <<(
297 std::basic_ostream<charT, traits> & stream,
const PolyPolygon& poly )
299 stream <<
"[" << poly.Count() <<
":";
300 for (sal_uInt16 i = 0;
i < poly.Count();
i++)
304 stream << poly.GetObject(i);
bool operator==(const BigInt &rVal1, const BigInt &rVal2)
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
virtual css::uno::Reference< css::embed::XEmbeddedObject > GetObject() override
Reference< XOutputStream > stream
void SetFlags(EVControlBits &rBits, EVControlBits nMask, bool bOn)
void Clear(EHistoryType eHistory)
std::vector< tools::PolyPolygon > PolyPolyVector