LibreOffice Module basegfx (master) 1
b2dpolygontools.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#pragma once
21
22#include <vector>
23#include <functional>
24
30#include <com/sun/star/drawing/PointSequence.hpp>
31#include <com/sun/star/drawing/FlagSequence.hpp>
34
35
36namespace basegfx { class B2DPolyPolygon; }
37
38// Definitions for the cut flags used from the findCut methods
39enum class CutFlagValue
40{
41 NONE = 0x0000,
42 LINE = 0x0001,
43 START1 = 0x0002,
44 START2 = 0x0004,
45 END1 = 0x0008,
46 END2 = 0x0010,
49};
50namespace o3tl
51{
52 template<> struct typed_flags<CutFlagValue> : is_typed_flags<CutFlagValue, 0x1f> {};
53}
54
55namespace basegfx
56{
57 class B2DPolygon;
58 class B2DRange;
59}
60
61namespace basegfx::utils
62{
63 // B2DPolygon tools
64
65 // open/close with point add/remove and control point corrections
66 BASEGFX_DLLPUBLIC void openWithGeometryChange(B2DPolygon& rCandidate);
67 BASEGFX_DLLPUBLIC void closeWithGeometryChange(B2DPolygon& rCandidate);
68
78 BASEGFX_DLLPUBLIC void checkClosed(B2DPolygon& rCandidate);
79
80 // Get successor and predecessor indices. Returning the same index means there
81 // is none. Same for successor.
82 BASEGFX_DLLPUBLIC sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate);
83 BASEGFX_DLLPUBLIC sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B2DPolygon& rCandidate);
84
85 // Get orientation of Polygon
86 BASEGFX_DLLPUBLIC B2VectorOrientation getOrientation(const B2DPolygon& rCandidate);
87
88 // isInside tests for B2dPoint and other B2dPolygon. On border is not inside as long as
89 // not true is given in bWithBorder flag.
90 BASEGFX_DLLPUBLIC bool isInside(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder = false);
91 BASEGFX_DLLPUBLIC bool isInside(const B2DPolygon& rCandidate, const B2DPolygon& rPolygon, bool bWithBorder = false);
92
104 BASEGFX_DLLPUBLIC B2DRange getRange(const B2DPolygon& rCandidate);
105
106 // get signed area of polygon
107 BASEGFX_DLLPUBLIC double getSignedArea(const B2DPolygon& rCandidate);
108
109 // get area of polygon
110 BASEGFX_DLLPUBLIC double getArea(const B2DPolygon& rCandidate);
111
113 BASEGFX_DLLPUBLIC double getEdgeLength(const B2DPolygon& rCandidate, sal_uInt32 nIndex);
114
116 BASEGFX_DLLPUBLIC double getLength(const B2DPolygon& rCandidate);
117
118 // get position on polygon for absolute given distance. If
119 // length is given, it is assumed the correct polygon length, if 0.0 it is calculated
120 // using getLength(...)
121 BASEGFX_DLLPUBLIC B2DPoint getPositionAbsolute(const B2DPolygon& rCandidate, double fDistance, double fLength = 0.0);
122
123 // get position on polygon for relative given distance in range [0.0 .. 1.0]. If
124 // length is given, it is assumed the correct polygon length, if 0.0 it is calculated
125 // using getLength(...)
126 BASEGFX_DLLPUBLIC B2DPoint getPositionRelative(const B2DPolygon& rCandidate, double fDistance, double fLength = 0.0);
127
128 // get a snippet from given polygon for absolute distances. The polygon is assumed
129 // to be opened (not closed). fFrom and fTo need to be in range [0.0 .. fLength], where
130 // fTo >= fFrom. If length is given, it is assumed the correct polygon length,
131 // if 0.0 it is calculated using getLength(...)
132 BASEGFX_DLLPUBLIC B2DPolygon getSnippetAbsolute(const B2DPolygon& rCandidate, double fFrom, double fTo, double fLength = 0.0);
133
134 // Continuity check for point with given index
135 BASEGFX_DLLPUBLIC B2VectorContinuity getContinuityInPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex);
136
137 // Subdivide all contained curves. Use distanceBound value if given.
138 BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByDistance(const B2DPolygon& rCandidate, double fDistanceBound, int nRecurseLimit = 30);
139
140 // Subdivide all contained curves. Use angleBound value if given.
141 BASEGFX_DLLPUBLIC B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon& rCandidate, double fAngleBound = 0.0);
142
143 // This version works with two points and vectors to define the
144 // edges for the cut test.
146 const B2DPoint& rEdge1Start, const B2DVector& rEdge1Delta,
147 const B2DPoint& rEdge2Start, const B2DVector& rEdge2Delta,
149 double* pCut1 = nullptr, double* pCut2 = nullptr);
150
151 // test if point is on the given edge in range ]0.0..1.0[ without
152 // the start/end points. If so, return true and put the parameter
153 // value in pCut (if provided)
155 const B2DPoint& rPoint,
156 const B2DPoint& rEdgeStart,
157 const B2DVector& rEdgeDelta,
158 double* pCut = nullptr);
159
208 const B2DPolygon& rCandidate,
209 const std::vector<double>& rDotDashArray,
210 std::function<void(const basegfx::B2DPolygon& rSnippet)> aLineTargetCallback,
211 std::function<void(const basegfx::B2DPolygon& rSnippet)> aGapTargetCallback = std::function<void(const basegfx::B2DPolygon&)>(),
212 double fDotDashLength = 0.0);
214 const B2DPolygon& rCandidate,
215 const ::std::vector<double>& rDotDashArray,
216 B2DPolyPolygon* pLineTarget,
217 B2DPolyPolygon* pGapTarget = nullptr,
218 double fDotDashLength = 0.0);
219
220 // test if point is inside epsilon-range around an edge defined
221 // by the two given points. Can be used for HitTesting. The epsilon-range
222 // is defined to be the rectangle centered to the given edge, using height
223 // 2 x fDistance, and the circle around both points with radius fDistance.
224 BASEGFX_DLLPUBLIC bool isInEpsilonRange(const B2DPoint& rEdgeStart, const B2DPoint& rEdgeEnd, const B2DPoint& rTestPosition, double fDistance);
225
226 // test if point is inside epsilon-range around the given Polygon. Can be used
227 // for HitTesting. The epsilon-range is defined to be the rectangle centered
228 // to the given edge, using height 2 x fDistance, and the circle around both points
229 // with radius fDistance.
230 BASEGFX_DLLPUBLIC bool isInEpsilonRange(const B2DPolygon& rCandidate, const B2DPoint& rTestPosition, double fDistance);
231
242 BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromRect( const B2DRectangle& rRect, double fRadiusX, double fRadiusY );
243
247
251
264 BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double fRadius );
265
268
279 BASEGFX_DLLPUBLIC B2DPolygon const & createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant = 0);
280
299 BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY, sal_uInt32 nStartQuadrant = 0);
300
303 BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromEllipseSegment( const B2DPoint& rCenter, double fRadiusX, double fRadiusY, double fStart, double fEnd );
304
306
317 BASEGFX_DLLPUBLIC bool isRectangle( const B2DPolygon& rPoly );
318
319 // create 3d polygon from given 2d polygon. The given fZCoordinate is used to expand the
320 // third coordinate.
321 BASEGFX_DLLPUBLIC B3DPolygon createB3DPolygonFromB2DPolygon(const B2DPolygon& rCandidate, double fZCoordinate = 0.0);
322
323 // create 2d tools::PolyPolygon from given 3d PolyPolygon. All coordinates are transformed using the given
324 // matrix and the resulting x,y is used to form the new polygon.
326
327 // calculate the smallest distance to given edge and return. The relative position on the edge is returned in Cut.
328 // That position is in the range [0.0 .. 1.0] and the returned distance is adapted accordingly to the start or end
329 // point of the edge
330 BASEGFX_DLLPUBLIC double getSmallestDistancePointToEdge(const B2DPoint& rPointA, const B2DPoint& rPointB, const B2DPoint& rTestPoint, double& rCut);
331
332 // for each contained edge calculate the smallest distance. Return the index to the smallest
333 // edge in rEdgeIndex. The relative position on the edge is returned in rCut.
334 // If nothing was found (e.g. empty input plygon), DBL_MAX is returned.
335 BASEGFX_DLLPUBLIC double getSmallestDistancePointToPolygon(const B2DPolygon& rCandidate, const B2DPoint& rTestPoint, sal_uInt32& rEdgeIndex, double& rCut);
336
337 // distort single point. rOriginal describes the original range, where the given points describe the distorted corresponding points.
338 BASEGFX_DLLPUBLIC B2DPoint distort(const B2DPoint& rCandidate, const B2DRange& rOriginal, const B2DPoint& rTopLeft, const B2DPoint& rTopRight, const B2DPoint& rBottomLeft, const B2DPoint& rBottomRight);
339
340 // distort polygon. rOriginal describes the original range, where the given points describe the distorted corresponding points.
341 BASEGFX_DLLPUBLIC B2DPolygon distort(const B2DPolygon& rCandidate, const B2DRange& rOriginal, const B2DPoint& rTopLeft, const B2DPoint& rTopRight, const B2DPoint& rBottomLeft, const B2DPoint& rBottomRight);
342
343 // expand all segments (which are not yet) to curve segments. This is done with setting the control
344 // vectors on the 1/3 resp. 2/3 distances on each segment.
346
347 // expand given segment to curve segment. This is done with setting the control
348 // vectors on the 1/3 resp. 2/3 distances. The return value describes if a change took place.
349 BASEGFX_DLLPUBLIC bool expandToCurveInPoint(B2DPolygon& rCandidate, sal_uInt32 nIndex);
350
351 // set continuity for given index. If not a curve, nothing will change. Non-curve points are not changed, too.
352 // The return value describes if a change took place.
353 BASEGFX_DLLPUBLIC bool setContinuityInPoint(B2DPolygon& rCandidate, sal_uInt32 nIndex, B2VectorContinuity eContinuity);
354
355 // test if polygon contains neutral points. A neutral point is one whose orientation is neutral
356 // e.g. positioned on the edge of its predecessor and successor
357 BASEGFX_DLLPUBLIC bool hasNeutralPoints(const B2DPolygon& rCandidate);
358
359 // remove neutral points. A neutral point is one whose orientation is neutral
360 // e.g. positioned on the edge of its predecessor and successor
362
363 // tests if polygon is convex
364 BASEGFX_DLLPUBLIC bool isConvex(const B2DPolygon& rCandidate);
365
366 // calculates the orientation at edge nIndex
367 BASEGFX_DLLPUBLIC B2VectorOrientation getOrientationForIndex(const B2DPolygon& rCandidate, sal_uInt32 nIndex);
368
369 // calculates if given point is on given line, taking care of the numerical epsilon
370 BASEGFX_DLLPUBLIC bool isPointOnLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidate, bool bWithPoints);
371
372 // calculates if given point is on given polygon, taking care of the numerical epsilon. Uses
373 // isPointOnLine internally
374 BASEGFX_DLLPUBLIC bool isPointOnPolygon(const B2DPolygon& rCandidate, const B2DPoint& rPoint, bool bWithPoints = true);
375
376 // test if candidate is inside triangle
377 BASEGFX_DLLPUBLIC bool isPointInTriangle(const B2DPoint& rA, const B2DPoint& rB, const B2DPoint& rC, const B2DPoint& rCandidate, bool bWithBorder);
378
379 // test if candidateA and candidateB are on the same side of the given line
380 bool arePointsOnSameSideOfLine(const B2DPoint& rStart, const B2DPoint& rEnd, const B2DPoint& rCandidateA, const B2DPoint& rCandidateB, bool bWithLine);
381
382 // add triangles for given rCandidate to rTarget. For each triangle, 3 points will be added to rCandidate.
383 // All triangles will go from the start point of rCandidate to two consecutive points, building (rCandidate.count() - 2)
384 // triangles.
385 void addTriangleFan(
386 const B2DPolygon& rCandidate,
388
389 // grow for polygon. Move all geometry in each point in the direction of the normal in that point
390 // with the given amount. Value may be negative.
391 BASEGFX_DLLPUBLIC B2DPolygon growInNormalDirection(const B2DPolygon& rCandidate, double fValue);
392
393 // force all sub-polygons to a point count of nSegments
394 BASEGFX_DLLPUBLIC B2DPolygon reSegmentPolygon(const B2DPolygon& rCandidate, sal_uInt32 nSegments);
395
396 // create polygon state at t from 0.0 to 1.0 between the two polygons. Both polygons must have the same
397 // organisation, e.g. same amount of points
398 BASEGFX_DLLPUBLIC B2DPolygon interpolate(const B2DPolygon& rOld1, const B2DPolygon& rOld2, double t);
399
400 // #i76891# Try to remove existing curve segments if they are simply edges
402
403 // makes the given indexed point the new polygon start point. To do that, the points in the
404 // polygon will be rotated. This is only valid for closed polygons, for non-closed ones
405 // an assertion will be triggered
406 BASEGFX_DLLPUBLIC B2DPolygon makeStartPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndexOfNewStatPoint);
407
436 B2DPolygon createEdgesOfGivenLength(const B2DPolygon& rCandidate, double fLength, double fStart = 0.0, double fEnd = 0.0);
437
453 BASEGFX_DLLPUBLIC B2DPolygon createWaveline(const B2DPolygon& rCandidate, double fWaveWidth, double fWaveHeight);
454
468
471 BASEGFX_DLLPUBLIC B2DVector getTangentEnteringPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex);
472
475 BASEGFX_DLLPUBLIC B2DVector getTangentLeavingPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex);
476
479 const css::drawing::PointSequence& rPointSequenceSource);
481 const B2DPolygon& rPolygon,
482 css::drawing::PointSequence& rPointSequenceRetval);
483
484 /* converters for css::drawing::PointSequence and
485 css::drawing::FlagSequence to B2DPolygon (curved polygons)
486 */
488 const css::drawing::PointSequence& rPointSequenceSource,
489 const css::drawing::FlagSequence& rFlagSequenceSource);
491 const B2DPolygon& rPolyPolygon,
492 css::drawing::PointSequence& rPointSequenceRetval,
493 css::drawing::FlagSequence& rFlagSequenceRetval);
494
510 std::u16string_view rSvgPointsAttribute );
511
525 BASEGFX_DLLPUBLIC OUString exportToSvgPoints( const B2DPolygon& rPoly );
526
527} // end of namespace basegfx::utils
528
529/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CutFlagValue
#define BASEGFX_DLLPUBLIC
Definition: basegfxdllapi.h:35
Base Point class with two double values.
Definition: b2dpoint.hxx:42
A two-dimensional interval over doubles.
Definition: b2drange.hxx:54
Base Point class with two double values.
Definition: b2dvector.hxx:40
NONE
::std::vector< B2DTriangle > B2DTriangleVector
B2DPolygon removeNeutralPoints(const B2DPolygon &rCandidate)
double getArea(const B2DPolygon &rCandidate)
B2VectorContinuity getContinuityInPoint(const B2DPolygon &rCandidate, sal_uInt32 nIndex)
bool isPointOnLine(const B2DPoint &rStart, const B2DPoint &rEnd, const B2DPoint &rCandidate, bool bWithPoints)
B2DPolygon const & createHalfUnitCircle()
create half circle centered on (0,0) from [0 .. M_PI]
CutFlagValue findCut(const B2DPoint &rEdge1Start, const B2DVector &rEdge1Delta, const B2DPoint &rEdge2Start, const B2DVector &rEdge2Delta, CutFlagValue aCutFlags, double *pCut1, double *pCut2)
bool importFromSvgPoints(B2DPolygon &o_rPoly, std::u16string_view rSvgPointsAttribute)
Read poly-polygon from SVG.
void addTriangleFan(const B2DPolygon &rCandidate, triangulator::B2DTriangleVector &rTarget)
double getLength(const B2DPolygon &rCandidate)
get length of polygon
bool arePointsOnSameSideOfLine(const B2DPoint &rStart, const B2DPoint &rEnd, const B2DPoint &rCandidateA, const B2DPoint &rCandidateB, bool bWithLine)
B2DPolygon reSegmentPolygon(const B2DPolygon &rCandidate, sal_uInt32 nSegments)
B2DPolygon createEdgesOfGivenLength(const B2DPolygon &rCandidate, double fLength, double fStart, double fEnd)
create edges of given length along given B2DPolygon
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
Create a polygon from a rectangle.
B2DPolygon UnoPointSequenceToB2DPolygon(const css::drawing::PointSequence &rPointSequenceSource)
converters for css::drawing::PointSequence
B2DPolygon interpolate(const B2DPolygon &rOld1, const B2DPolygon &rOld2, double t)
B2DPolygon expandToCurve(const B2DPolygon &rCandidate)
B2DPolygon growInNormalDirection(const B2DPolygon &rCandidate, double fValue)
double getSmallestDistancePointToEdge(const B2DPoint &rPointA, const B2DPoint &rPointB, const B2DPoint &rTestPoint, double &rCut)
B2DPoint getPositionAbsolute(const B2DPolygon &rCandidate, double fDistance, double fLength)
B2DPolygon adaptiveSubdivideByDistance(const B2DPolygon &rCandidate, double fDistanceBound, int nRecurseLimit)
void applyLineDashing(const B2DPolygon &rCandidate, const std::vector< double > &rDotDashArray, B2DPolyPolygon *pLineTarget, B2DPolyPolygon *pGapTarget, double fDotDashLength)
sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B2DPolygon &rCandidate)
B2VectorOrientation getOrientationForIndex(const B2DPolygon &rCandidate, sal_uInt32 nIndex)
B2VectorOrientation getOrientation(const B2DPolygon &rCandidate)
B2DPolygon const & createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant)
create a polygon which describes the unit circle and close it
double getSignedArea(const B2DPolygon &rCandidate)
bool isInside(const B2DPolygon &rCandidate, const B2DPoint &rPoint, bool bWithBorder)
B2DPoint distort(const B2DPoint &rCandidate, const B2DRange &rOriginal, const B2DPoint &rTopLeft, const B2DPoint &rTopRight, const B2DPoint &rBottomLeft, const B2DPoint &rBottomRight)
B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon &rCandidate, double fAngleBound)
B3DPolygon createB3DPolygonFromB2DPolygon(const B2DPolygon &rCandidate, double fZCoordinate)
B2DPolygon createWaveline(const B2DPolygon &rCandidate, double fWaveWidth, double fWaveHeight)
Create Waveline along given polygon The implementation is based on createEdgesOfGivenLength and creat...
void B2DPolygonToUnoPolygonBezierCoords(const B2DPolygon &rPolygon, css::drawing::PointSequence &rPointSequenceRetval, css::drawing::FlagSequence &rFlagSequenceRetval)
B2DPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolygon &rCandidate)
snap some polygon coordinates to discrete coordinates
B2DPolygon createPolygonFromCircle(const B2DPoint &rCenter, double fRadius)
Create a circle polygon with given radius.
void closeWithGeometryChange(B2DPolygon &rCandidate)
bool isPointOnPolygon(const B2DPolygon &rCandidate, const B2DPoint &rPoint, bool bWithPoints)
bool expandToCurveInPoint(B2DPolygon &rCandidate, sal_uInt32 nIndex)
bool isInEpsilonRange(const B2DPoint &rEdgeStart, const B2DPoint &rEdgeEnd, const B2DPoint &rTestPosition, double fDistance)
bool isPointOnEdge(const B2DPoint &rPoint, const B2DPoint &rEdgeStart, const B2DVector &rEdgeDelta, double *pCut)
B2DPolygon createB2DPolygonFromB3DPolygon(const B3DPolygon &rCandidate, const B3DHomMatrix &rMat)
bool isRectangle(const B2DPolygon &rPoly)
Predicate whether a given polygon is a rectangle.
void openWithGeometryChange(B2DPolygon &rCandidate)
sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const B2DPolygon &rCandidate)
B2DVector getTangentLeavingPoint(const B2DPolygon &rCandidate, sal_uInt32 nIndex)
get the tangent with which the given point is left seen from the following polygon path data.
B2DPolygon getSnippetAbsolute(const B2DPolygon &rCandidate, double fFrom, double fTo, double fLength)
OUString exportToSvgPoints(const B2DPolygon &rPoly)
Write poly-polygon to SVG.
B2DPolygon createPolygonFromEllipseSegment(const B2DPoint &rCenter, double fRadiusX, double fRadiusY, double fStart, double fEnd)
Create a unit ellipse polygon with the given angles, from start to end.
bool hasNeutralPoints(const B2DPolygon &rCandidate)
B2DPoint getPositionRelative(const B2DPolygon &rCandidate, double fDistance, double fLength)
void B2DPolygonToUnoPointSequence(const B2DPolygon &rPolygon, css::drawing::PointSequence &rPointSequenceRetval)
B2DVector getTangentEnteringPoint(const B2DPolygon &rCandidate, sal_uInt32 nIndex)
get the tangent with which the given point is entered seen from the previous polygon path data.
double getEdgeLength(const B2DPolygon &rCandidate, sal_uInt32 nIndex)
get length of polygon edge from point nIndex to nIndex + 1
double getSmallestDistancePointToPolygon(const B2DPolygon &rCandidate, const B2DPoint &rTestPoint, sal_uInt32 &rEdgeIndex, double &rCut)
bool setContinuityInPoint(B2DPolygon &rCandidate, sal_uInt32 nIndex, B2VectorContinuity eContinuity)
B2DPolygon simplifyCurveSegments(const B2DPolygon &rCandidate)
B2DPolygon UnoPolygonBezierCoordsToB2DPolygon(const css::drawing::PointSequence &rPointSequenceSource, const css::drawing::FlagSequence &rFlagSequenceSource)
bool isConvex(const B2DPolygon &rCandidate)
B2DPolygon const & createUnitPolygon()
Create the unit polygon.
B2DPolygon createPolygonFromEllipse(const B2DPoint &rCenter, double fRadiusX, double fRadiusY, sal_uInt32 nStartQuadrant)
Create an ellipse polygon with given radii.
void checkClosed(B2DPolygon &rCandidate)
Check if given polygon is closed.
B2DPolygon createPolygonFromUnitEllipseSegment(double fStart, double fEnd)
B2DPolygon makeStartPoint(const B2DPolygon &rCandidate, sal_uInt32 nIndexOfNewStatPoint)
bool isPointInTriangle(const B2DPoint &rA, const B2DPoint &rB, const B2DPoint &rC, const B2DPoint &rCandidate, bool bWithBorder)
B2DRange getRange(const B2DPolygon &rCandidate)
Get the range of a polygon.
B2VectorContinuity
Descriptor for the mathematical continuity of two 2D Vectors.
Definition: b2enums.hxx:41
B2VectorOrientation
Descriptor for the mathematical orientations of two 2D Vectors.
Definition: b2enums.hxx:27
LINE