LibreOffice Module tools (master) 1
Namespaces | Macros | Functions | Variables
poly.cxx File Reference
#include <osl/endian.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <tools/bigint.hxx>
#include <tools/debug.hxx>
#include <tools/helpers.hxx>
#include <tools/stream.hxx>
#include <tools/vcompat.hxx>
#include <tools/gen.hxx>
#include <poly.h>
#include <o3tl/safeint.hxx>
#include <tools/line.hxx>
#include <tools/poly.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/curve/b2dcubicbezier.hxx>
#include <memory>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <limits.h>
#include <cmath>
Include dependency graph for poly.cxx:

Go to the source code of this file.

Namespaces

namespace  tools
 Note: this class is a true marvel of engineering: because the author could not decide whether it's better to have a closed or half-open interval, they just implemented both in the same class!
 

Macros

#define FSQRT2   1.4142135623730950488016887242097
 

Functions

static double ImplGetParameter (const Point &rCenter, const Point &rPt, double fWR, double fHR)
 
static void tools::ImplAdaptiveSubdivide (std::vector< Point > &rPoints, const double old_d2, int recursionDepth, const double d2, const double P1x, const double P1y, const double P2x, const double P2y, const double P3x, const double P3y, const double P4x, const double P4y)
 Recursively subdivide cubic bezier curve via deCasteljau. More...
 
SvStreamtools::ReadPolygon (SvStream &rIStream, tools::Polygon &rPoly)
 
SvStreamtools::WritePolygon (SvStream &rOStream, const tools::Polygon &rPoly)
 
static void tools::impCorrectContinuity (basegfx::B2DPolygon &roPolygon, sal_uInt32 nIndex, PolyFlags nCFlag)
 

Variables

constexpr int EDGE_LEFT = 1
 
constexpr int EDGE_TOP = 2
 
constexpr int EDGE_RIGHT = 4
 
constexpr int EDGE_BOTTOM = 8
 
constexpr int EDGE_HORZ = EDGE_RIGHT | EDGE_LEFT
 
constexpr int EDGE_VERT = EDGE_TOP | EDGE_BOTTOM
 
constexpr double SMALL_DVALUE = 0.0000001
 

Macro Definition Documentation

◆ FSQRT2

#define FSQRT2   1.4142135623730950488016887242097

Definition at line 54 of file poly.cxx.

Function Documentation

◆ ImplGetParameter()

static double ImplGetParameter ( const Point rCenter,
const Point rPt,
double  fWR,
double  fHR 
)
static

Definition at line 56 of file poly.cxx.

References Point::X(), and Point::Y().

Referenced by ImplPolygon::ImplPolygon().

Variable Documentation

◆ EDGE_BOTTOM

constexpr int EDGE_BOTTOM = 8
constexpr

Definition at line 50 of file poly.cxx.

◆ EDGE_HORZ

constexpr int EDGE_HORZ = EDGE_RIGHT | EDGE_LEFT
constexpr

Definition at line 51 of file poly.cxx.

Referenced by tools::Polygon::Clip().

◆ EDGE_LEFT

constexpr int EDGE_LEFT = 1
constexpr

Definition at line 47 of file poly.cxx.

◆ EDGE_RIGHT

constexpr int EDGE_RIGHT = 4
constexpr

Definition at line 49 of file poly.cxx.

◆ EDGE_TOP

constexpr int EDGE_TOP = 2
constexpr

Definition at line 48 of file poly.cxx.

◆ EDGE_VERT

constexpr int EDGE_VERT = EDGE_TOP | EDGE_BOTTOM
constexpr

Definition at line 52 of file poly.cxx.

Referenced by tools::Polygon::Clip().

◆ mfX

double mfX
private

Definition at line 1249 of file poly.cxx.

◆ mfY

double mfY
private

Definition at line 1250 of file poly.cxx.

◆ SMALL_DVALUE

constexpr double SMALL_DVALUE = 0.0000001
constexpr

Definition at line 53 of file poly.cxx.

Referenced by tools::Polygon::ImplReduceEdges().