LibreOffice Module basegfx (master) 1
|
Namespaces | |
namespace | RectClipFlags |
Classes | |
class | B2DClipState |
This class provides an optimized, symbolic clip state for graphical output. More... | |
class | B2DHomMatrixBufferedDecompose |
class | B2DHomMatrixBufferedOnDemandDecompose |
class | ImplB2DClipState |
class | KeyStopLerp |
Lerp in a vector of key stops. More... | |
class | PointIndex |
Helper class to transport PointIndices to a PolyPolygon, with an operator< for convenient sorting in a std::set usage. More... | |
Typedefs | |
typedef o3tl::sorted_vector< PointIndex > | PointIndexSet |
the PointIndexSet itself; it allows to define a 'selection'of points in a tools::PolyPolygon by giving the polygon and point index. More... | |
Functions | |
::slideshow::internal::RGBColor | lerp< ::slideshow::internal::RGBColor > (const ::slideshow::internal::RGBColor &rFrom, const ::slideshow::internal::RGBColor &rTo, double t) |
sal_Int16 | lerp< sal_Int16 > (const sal_Int16 &, const sal_Int16 &rTo, double) |
OUString | lerp< OUString > (const OUString &, const OUString &rTo, double) |
bool | lerp< bool > (const bool &, const bool &rTo, double) |
BColor | rgb2hsl (const BColor &rRGBColor) |
Transform from RGB to HSL. More... | |
static double | hsl2rgbHelper (double nValue1, double nValue2, double nHue) |
BColor | hsl2rgb (const BColor &rHSLColor) |
Transform from HSL to RGB. More... | |
BColor | rgb2hsv (const BColor &rRGBColor) |
Transform from RGB to HSV. More... | |
BColor | hsv2rgb (const BColor &rHSVColor) |
Transform from HSV to RGB. More... | |
void | createSinCosOrthogonal (double &o_rSin, double &rCos, double fRadiant) |
If the rotation angle is an approximate multiple of pi/2, force fSin/fCos to -1/0/1, to maintain orthogonality (which might also be advantageous for the other cases, but: for multiples of pi/2, the exact values can be attained. More... | |
B2DHomMatrix | createScaleB2DHomMatrix (double fScaleX, double fScaleY) |
Tooling methods for on-the-fly matrix generation e.g. More... | |
B2DHomMatrix | createShearXB2DHomMatrix (double fShearX) |
B2DHomMatrix | createShearYB2DHomMatrix (double fShearY) |
B2DHomMatrix | createRotateB2DHomMatrix (double fRadiant) |
B2DHomMatrix | createTranslateB2DHomMatrix (double fTranslateX, double fTranslateY) |
B2DHomMatrix | createScaleShearXRotateTranslateB2DHomMatrix (double fScaleX, double fScaleY, double fShearX, double fRadiant, double fTranslateX, double fTranslateY) |
Tooling methods for faster completely combined matrix creation when scale, shearX, rotation and translation needs to be done in exactly that order. More... | |
B2DHomMatrix | createShearXRotateTranslateB2DHomMatrix (double fShearX, double fRadiant, double fTranslateX, double fTranslateY) |
B2DHomMatrix | createScaleTranslateB2DHomMatrix (double fScaleX, double fScaleY, double fTranslateX, double fTranslateY) |
B2DHomMatrix | createRotateAroundPoint (double fPointX, double fPointY, double fRadiant) |
special for the often used case of rotation around a point More... | |
B2DHomMatrix | createRotateAroundCenterKeepAspectRatioStayInsideRange (const basegfx::B2DRange &rTargetRange, double fRotate) |
special for creating a mapping for a Range rotated around it's center while keeping AspectRatio unchanged and staying inside the given Range by optimally using the available space (no overlap or outside allowed) More... | |
B2DHomMatrix | createSourceRangeTargetRangeTransform (const B2DRange &rSourceRange, const B2DRange &rTargetRange) |
special for the case to map from source range to target range More... | |
B2DHomMatrix | createCoordinateSystemTransform (const B2DPoint &rOrigin, const B2DVector &rX, const B2DVector &rY) |
create based on given CoordinateSystem which is defined by origin and x/yaxis More... | |
B2DTuple | getColumn (const B2DHomMatrix &rMatrix, sal_uInt16 nCol) |
get column vector from B2dHomMatrix, e.g. to extract coordinate system origin and x/yaxis More... | |
B3DHomMatrix | UnoHomogenMatrixToB3DHomMatrix (const com::sun::star::drawing::HomogenMatrix &rMatrixIn) |
void | B3DHomMatrixToUnoHomogenMatrix (const B3DHomMatrix &rMatrixIn, com::sun::star::drawing::HomogenMatrix &rMatrixOut) |
B2DPolyPolygon | createAreaGeometryForLineStartEnd (const B2DPolygon &rCandidate, const B2DPolyPolygon &rArrow, bool bStart, double fWidth, double fCandidateLength, double fDockingPosition, double *pConsumedLength=nullptr, double fShift=0.0) |
Create line start/end geometry element, mostly arrows and things like that. More... | |
B2DPolyPolygon | createAreaGeometry (const B2DPolygon &rCandidate, double fHalfLineWidth, B2DLineJoin eJoin, css::drawing::LineCap eCap, double fMaxAllowedAngle=basegfx::deg2rad(12.5), double fMaxPartOfEdge=0.4, double fMiterMinimumAngle=basegfx::deg2rad(15.0)) |
create filled polygon geometry for lines with a line width More... | |
B2DPolyPolygon | clipPolygonOnParallelAxis (const B2DPolygon &rCandidate, bool bParallelToXAxis, bool bAboveAxis, double fValueOnOtherAxis, bool bStroke) |
B2DPolyPolygon | clipPolyPolygonOnParallelAxis (const B2DPolyPolygon &rCandidate, bool bParallelToXAxis, bool bAboveAxis, double fValueOnOtherAxis, bool bStroke) |
B2DPolyPolygon | clipPolygonOnRange (const B2DPolygon &rCandidate, const B2DRange &rRange, bool bInside, bool bStroke) |
B2DPolyPolygon | clipPolyPolygonOnRange (const B2DPolyPolygon &rCandidate, const B2DRange &rRange, bool bInside, bool bStroke) |
B2DPolyPolygon | clipPolyPolygonOnPolyPolygon (const B2DPolyPolygon &rCandidate, const B2DPolyPolygon &rClip, bool bInside, bool bStroke, size_t *pPointLimit) |
B2DPolyPolygon | clipPolygonOnPolyPolygon (const B2DPolygon &rCandidate, const B2DPolyPolygon &rClip, bool bInside, bool bStroke) |
static sal_uInt32 | scissorLineSegment (::basegfx::B2DPoint *in_vertex, sal_uInt32 in_count, ::basegfx::B2DPoint *out_vertex, scissor_plane const *pPlane, const ::basegfx::B2DRectangle &rR) |
B2DPolygon | clipTriangleListOnRange (const B2DPolygon &rCandidate, const B2DRange &rRange) |
B2DPolygon | addPointsAtCutsAndTouches (const B2DPolygon &rCandidate, size_t *pPointLimit) |
B2DPolyPolygon | addPointsAtCutsAndTouches (const B2DPolyPolygon &rCandidate, size_t *pPointLimit) |
B2DPolygon | addPointsAtCuts (const B2DPolygon &rCandidate, const B2DPoint &rStart, const B2DPoint &rEnd) |
B2DPolygon | addPointsAtCuts (const B2DPolygon &rCandidate, const B2DPolyPolygon &rPolyMask) |
void | openWithGeometryChange (B2DPolygon &rCandidate) |
void | closeWithGeometryChange (B2DPolygon &rCandidate) |
void | checkClosed (B2DPolygon &rCandidate) |
Check if given polygon is closed. More... | |
sal_uInt32 | getIndexOfPredecessor (sal_uInt32 nIndex, const B2DPolygon &rCandidate) |
sal_uInt32 | getIndexOfSuccessor (sal_uInt32 nIndex, const B2DPolygon &rCandidate) |
B2VectorOrientation | getOrientation (const B2DPolygon &rCandidate) |
B2VectorContinuity | getContinuityInPoint (const B2DPolygon &rCandidate, sal_uInt32 nIndex) |
B2DPolygon | adaptiveSubdivideByDistance (const B2DPolygon &rCandidate, double fDistanceBound, int nRecurseLimit) |
B2DPolygon | adaptiveSubdivideByAngle (const B2DPolygon &rCandidate, double fAngleBound) |
bool | isInside (const B2DPolygon &rCandidate, const B2DPoint &rPoint, bool bWithBorder) |
bool | isInside (const B2DPolygon &rCandidate, const B2DPolygon &rPolygon, bool bWithBorder) |
B2DRange | getRange (const B2DPolygon &rCandidate) |
Get the range of a polygon. More... | |
double | getSignedArea (const B2DPolygon &rCandidate) |
double | getArea (const B2DPolygon &rCandidate) |
double | getEdgeLength (const B2DPolygon &rCandidate, sal_uInt32 nIndex) |
get length of polygon edge from point nIndex to nIndex + 1 More... | |
double | getLength (const B2DPolygon &rCandidate) |
get length of polygon More... | |
B2DPoint | getPositionAbsolute (const B2DPolygon &rCandidate, double fDistance, double fLength) |
B2DPoint | getPositionRelative (const B2DPolygon &rCandidate, double fDistance, double fLength) |
B2DPolygon | getSnippetAbsolute (const B2DPolygon &rCandidate, double fFrom, double fTo, double fLength) |
CutFlagValue | findCut (const B2DPoint &rEdge1Start, const B2DVector &rEdge1Delta, const B2DPoint &rEdge2Start, const B2DVector &rEdge2Delta, CutFlagValue aCutFlags, double *pCut1, double *pCut2) |
bool | isPointOnEdge (const B2DPoint &rPoint, const B2DPoint &rEdgeStart, const B2DVector &rEdgeDelta, double *pCut) |
void | applyLineDashing (const B2DPolygon &rCandidate, const std::vector< double > &rDotDashArray, B2DPolyPolygon *pLineTarget, B2DPolyPolygon *pGapTarget, double fDotDashLength) |
static void | implHandleSnippet (const B2DPolygon &rSnippet, const std::function< void(const basegfx::B2DPolygon &rSnippet)> &rTargetCallback, B2DPolygon &rFirst, B2DPolygon &rLast) |
static void | implHandleFirstLast (const std::function< void(const basegfx::B2DPolygon &rSnippet)> &rTargetCallback, B2DPolygon &rFirst, B2DPolygon &rLast) |
void | applyLineDashing (const B2DPolygon &rCandidate, const std::vector< double > &rDotDashArray, std::function< void(const basegfx::B2DPolygon &rSnippet)> aLineTargetCallback, std::function< void(const basegfx::B2DPolygon &rSnippet)> aGapTargetCallback=std::function< void(const basegfx::B2DPolygon &)>(), double fDotDashLength=0.0) |
Apply given LineDashing to given polygon. More... | |
bool | isInEpsilonRange (const B2DPoint &rEdgeStart, const B2DPoint &rEdgeEnd, const B2DPoint &rTestPosition, double fDistance) |
bool | isInEpsilonRange (const B2DPolygon &rCandidate, const B2DPoint &rTestPosition, double fDistance) |
static double | impDistanceBezierPointToControl (double fAngle) |
B2DPolygon | createPolygonFromRect (const B2DRectangle &rRect, double fRadiusX, double fRadiusY) |
Create a polygon from a rectangle. More... | |
B2DPolygon | createPolygonFromRect (const B2DRectangle &rRect) |
Create a polygon from a rectangle. More... | |
B2DPolygon const & | createUnitPolygon () |
Create the unit polygon. More... | |
B2DPolygon | createPolygonFromCircle (const B2DPoint &rCenter, double fRadius) |
Create a circle polygon with given radius. More... | |
static B2DPolygon | impCreateUnitCircle (sal_uInt32 nStartQuadrant) |
B2DPolygon const & | createHalfUnitCircle () |
create half circle centered on (0,0) from [0 .. M_PI] More... | |
B2DPolygon const & | createPolygonFromUnitCircle (sal_uInt32 nStartQuadrant=0) |
create a polygon which describes the unit circle and close it More... | |
B2DPolygon | createPolygonFromEllipse (const B2DPoint &rCenter, double fRadiusX, double fRadiusY, sal_uInt32 nStartQuadrant=0) |
Create an ellipse polygon with given radii. More... | |
B2DPolygon | createPolygonFromUnitEllipseSegment (double fStart, double fEnd) |
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. More... | |
bool | hasNeutralPoints (const B2DPolygon &rCandidate) |
B2DPolygon | removeNeutralPoints (const B2DPolygon &rCandidate) |
bool | isConvex (const B2DPolygon &rCandidate) |
B2VectorOrientation | getOrientationForIndex (const B2DPolygon &rCandidate, sal_uInt32 nIndex) |
bool | isPointOnLine (const B2DPoint &rStart, const B2DPoint &rEnd, const B2DPoint &rCandidate, bool bWithPoints) |
bool | isPointOnPolygon (const B2DPolygon &rCandidate, const B2DPoint &rPoint, bool bWithPoints) |
bool | isPointInTriangle (const B2DPoint &rA, const B2DPoint &rB, const B2DPoint &rC, const B2DPoint &rCandidate, bool bWithBorder) |
bool | arePointsOnSameSideOfLine (const B2DPoint &rStart, const B2DPoint &rEnd, const B2DPoint &rCandidateA, const B2DPoint &rCandidateB, bool bWithLine) |
void | addTriangleFan (const B2DPolygon &rCandidate, triangulator::B2DTriangleVector &rTarget) |
bool | isRectangle (const B2DPolygon &rPoly) |
Predicate whether a given polygon is a rectangle. More... | |
B3DPolygon | createB3DPolygonFromB2DPolygon (const B2DPolygon &rCandidate, double fZCoordinate) |
B2DPolygon | createB2DPolygonFromB3DPolygon (const B3DPolygon &rCandidate, const B3DHomMatrix &rMat) |
double | getSmallestDistancePointToEdge (const B2DPoint &rPointA, const B2DPoint &rPointB, const B2DPoint &rTestPoint, double &rCut) |
double | getSmallestDistancePointToPolygon (const B2DPolygon &rCandidate, const B2DPoint &rTestPoint, sal_uInt32 &rEdgeIndex, double &rCut) |
B2DPoint | distort (const B2DPoint &rCandidate, const B2DRange &rOriginal, const B2DPoint &rTopLeft, const B2DPoint &rTopRight, const B2DPoint &rBottomLeft, const B2DPoint &rBottomRight) |
B2DPolygon | distort (const B2DPolygon &rCandidate, const B2DRange &rOriginal, const B2DPoint &rTopLeft, const B2DPoint &rTopRight, const B2DPoint &rBottomLeft, const B2DPoint &rBottomRight) |
B2DPolygon | expandToCurve (const B2DPolygon &rCandidate) |
bool | expandToCurveInPoint (B2DPolygon &rCandidate, sal_uInt32 nIndex) |
bool | setContinuityInPoint (B2DPolygon &rCandidate, sal_uInt32 nIndex, B2VectorContinuity eContinuity) |
B2DPolygon | growInNormalDirection (const B2DPolygon &rCandidate, double fValue) |
B2DPolygon | reSegmentPolygon (const B2DPolygon &rCandidate, sal_uInt32 nSegments) |
B2DPolygon | interpolate (const B2DPolygon &rOld1, const B2DPolygon &rOld2, double t) |
B2DPolygon | simplifyCurveSegments (const B2DPolygon &rCandidate) |
B2DPolygon | makeStartPoint (const B2DPolygon &rCandidate, sal_uInt32 nIndexOfNewStatPoint) |
B2DPolygon | createEdgesOfGivenLength (const B2DPolygon &rCandidate, double fLength, double fStart=0.0, double fEnd=0.0) |
create edges of given length along given B2DPolygon More... | |
B2DPolygon | createWaveline (const B2DPolygon &rCandidate, double fWaveWidth, double fWaveHeight) |
Create Waveline along given polygon The implementation is based on createEdgesOfGivenLength and creates a curve segment with the given dimensions for each created line segment. More... | |
B2DPolygon | snapPointsOfHorizontalOrVerticalEdges (const B2DPolygon &rCandidate) |
snap some polygon coordinates to discrete coordinates More... | |
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. More... | |
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. More... | |
B2DPolygon | UnoPointSequenceToB2DPolygon (const css::drawing::PointSequence &rPointSequenceSource) |
converters for css::drawing::PointSequence More... | |
void | B2DPolygonToUnoPointSequence (const B2DPolygon &rPolygon, css::drawing::PointSequence &rPointSequenceRetval) |
B2DPolygon | UnoPolygonBezierCoordsToB2DPolygon (const css::drawing::PointSequence &rPointSequenceSource, const css::drawing::FlagSequence &rFlagSequenceSource) |
void | B2DPolygonToUnoPolygonBezierCoords (const B2DPolygon &rPolygon, css::drawing::PointSequence &rPointSequenceRetval, css::drawing::FlagSequence &rFlagSequenceRetval) |
B2DPolyPolygon | solveCrossovers (const B2DPolyPolygon &rCandidate, size_t *pPointLimit=nullptr) |
Solve all crossovers (aka self-intersections) in a polyPolygon. More... | |
B2DPolyPolygon | solveCrossovers (const B2DPolygon &rCandidate) |
Solve all crossovers (aka self-intersections) in a Polygon. More... | |
B2DPolyPolygon | stripNeutralPolygons (const B2DPolyPolygon &rCandidate) |
Strip neutral polygons from PolyPolygon. More... | |
B2DPolyPolygon | createNonzeroConform (const B2DPolyPolygon &rCandidate) |
Emulate nonzero winding rule filling. More... | |
B2DPolyPolygon | stripDispensablePolygons (const B2DPolyPolygon &rCandidate, bool bKeepAboveZero=false) |
Remove unnecessary/non-displayed polygons. More... | |
B2DPolyPolygon | prepareForPolygonOperation (const B2DPolygon &rCandidate) |
prep for ops - solve self-intersections and intersections, remove neutral parts and check orientations. More... | |
B2DPolyPolygon | prepareForPolygonOperation (const B2DPolyPolygon &rCandidate) |
prep for ops - solve self-intersections and intersections, remove neutral parts and check orientations. More... | |
B2DPolyPolygon | solvePolygonOperationOr (const B2DPolyPolygon &rCandidateA, const B2DPolyPolygon &rCandidateB) |
OR: Return all areas where CandidateA or CandidateB exist. More... | |
B2DPolyPolygon | solvePolygonOperationXor (const B2DPolyPolygon &rCandidateA, const B2DPolyPolygon &rCandidateB) |
XOR: Return all areas where CandidateA or CandidateB exist, but not both. More... | |
B2DPolyPolygon | solvePolygonOperationAnd (const B2DPolyPolygon &rCandidateA, const B2DPolyPolygon &rCandidateB) |
AND: Return all areas where CandidateA and CandidateB exist. More... | |
B2DPolyPolygon | solvePolygonOperationDiff (const B2DPolyPolygon &rCandidateA, const B2DPolyPolygon &rCandidateB) |
DIFF: Return all areas where CandidateA is not covered by CandidateB (cut B out of A) More... | |
B2DPolyPolygon | mergeToSinglePolyPolygon (const B2DPolyPolygonVector &rInput) |
merge all single PolyPolygons to a single, OR-ed PolyPolygon More... | |
B2DPolyPolygon | correctOrientations (const B2DPolyPolygon &rCandidate) |
B2DPolyPolygon | correctOutmostPolygon (const B2DPolyPolygon &rCandidate) |
B2DPolyPolygon | adaptiveSubdivideByDistance (const B2DPolyPolygon &rCandidate, double fDistanceBound, int nRecurseLimit) |
B2DPolyPolygon | adaptiveSubdivideByAngle (const B2DPolyPolygon &rCandidate, double fAngleBound) |
bool | isInside (const B2DPolyPolygon &rCandidate, const B2DPoint &rPoint, bool bWithBorder) |
B2DRange | getRange (const B2DPolyPolygon &rCandidate) |
Get the range of a polyPolygon. More... | |
double | getSignedArea (const B2DPolyPolygon &rCandidate) |
double | getArea (const B2DPolyPolygon &rCandidate) |
void | applyLineDashing (const B2DPolyPolygon &rCandidate, const std::vector< double > &rDotDashArray, B2DPolyPolygon *pLineTarget, double fFullDashDotLen) |
bool | isInEpsilonRange (const B2DPolyPolygon &rCandidate, const B2DPoint &rTestPosition, double fDistance) |
B3DPolyPolygon | createB3DPolyPolygonFromB2DPolyPolygon (const B2DPolyPolygon &rCandidate, double fZCoordinate) |
B2DPolyPolygon | createB2DPolyPolygonFromB3DPolyPolygon (const B3DPolyPolygon &rCandidate, const B3DHomMatrix &rMat) |
double | getSmallestDistancePointToPolyPolygon (const B2DPolyPolygon &rCandidate, const B2DPoint &rTestPoint, sal_uInt32 &rPolygonIndex, sal_uInt32 &rEdgeIndex, double &rCut) |
B2DPolyPolygon | distort (const B2DPolyPolygon &rCandidate, const B2DRange &rOriginal, const B2DPoint &rTopLeft, const B2DPoint &rTopRight, const B2DPoint &rBottomLeft, const B2DPoint &rBottomRight) |
B2DPolyPolygon | expandToCurve (const B2DPolyPolygon &rCandidate) |
B2DPolyPolygon | growInNormalDirection (const B2DPolyPolygon &rCandidate, double fValue) |
B2DPolyPolygon | reSegmentPolyPolygon (const B2DPolyPolygon &rCandidate, sal_uInt32 nSegments) |
B2DPolyPolygon | interpolate (const B2DPolyPolygon &rOld1, const B2DPolyPolygon &rOld2, double t) |
bool | isRectangle (const B2DPolyPolygon &rPoly) |
Predicate whether a given poly-polygon is a rectangle. More... | |
B2DPolyPolygon | simplifyCurveSegments (const B2DPolyPolygon &rCandidate) |
B2DPolyPolygon | snapPointsOfHorizontalOrVerticalEdges (const B2DPolyPolygon &rCandidate) |
snap some polygon coordinates to discrete coordinates More... | |
B2DPolyPolygon | createSevenSegmentPolyPolygon (char cNumber, bool bLitSegments) |
Creates polypolygon for seven-segment display number. More... | |
B2DPolyPolygon | UnoPointSequenceSequenceToB2DPolyPolygon (const css::drawing::PointSequenceSequence &rPointSequenceSequenceSource) |
converters for css::drawing::PointSequence More... | |
void | B2DPolyPolygonToUnoPointSequenceSequence (const B2DPolyPolygon &rPolyPolygon, css::drawing::PointSequenceSequence &rPointSequenceSequenceRetval) |
B2DPolyPolygon | UnoPolyPolygonBezierCoordsToB2DPolyPolygon (const css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsSource) |
converters for css::drawing::PolyPolygonBezierCoords (curved polygons) More... | |
void | B2DPolyPolygonToUnoPolyPolygonBezierCoords (const B2DPolyPolygon &rPolyPolygon, css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsRetval) |
bool | importFromSvgD (B2DPolyPolygon &o_rPolyPoly, std::u16string_view rSvgDAttribute, bool bHandleRelativeNextPointCompatible, PointIndexSet *pHelpPointIndexSet) |
Read poly-polygon from SVG. More... | |
bool | importFromSvgPoints (B2DPolygon &o_rPoly, std::u16string_view rSvgPointsAttribute) |
Read poly-polygon from SVG. More... | |
OUString | exportToSvgPoints (const B2DPolygon &rPoly) |
Write poly-polygon to SVG. More... | |
OUString | exportToSvgD (const B2DPolyPolygon &rPolyPoly, bool bUseRelativeCoordinates, bool bDetectQuadraticBeziers, bool bHandleRelativeNextPointCompatible, bool bOOXMLMotionPath=false) |
Export poly-polygon to SVG. More... | |
void | trapezoidSubdivide (B2DTrapezoidVector &ro_Result, const B2DPolyPolygon &rSourcePolyPolygon) |
void | createLineTrapezoidFromEdge (B2DTrapezoidVector &ro_Result, const B2DPoint &rPointA, const B2DPoint &rPointB, double fLineWidth) |
void | createLineTrapezoidFromB2DPolygon (B2DTrapezoidVector &ro_Result, const B2DPolygon &rPolygon, double fLineWidth) |
void | checkClosed (B3DPolygon &rCandidate) |
Check if given polygon is closed. More... | |
sal_uInt32 | getIndexOfSuccessor (sal_uInt32 nIndex, const B3DPolygon &rCandidate) |
B3DRange | getRange (const B3DPolygon &rCandidate) |
double | getLength (const B3DPolygon &rCandidate) |
void | applyLineDashing (const B3DPolygon &rCandidate, const std::vector< double > &rDotDashArray, B3DPolyPolygon *pLineTarget, double fDotDashLength) |
static void | implHandleSnippet (const B3DPolygon &rSnippet, const std::function< void(const basegfx::B3DPolygon &rSnippet)> &rTargetCallback, B3DPolygon &rFirst, B3DPolygon &rLast) |
static void | implHandleFirstLast (const std::function< void(const basegfx::B3DPolygon &rSnippet)> &rTargetCallback, B3DPolygon &rFirst, B3DPolygon &rLast) |
void | applyLineDashing (const B3DPolygon &rCandidate, const std::vector< double > &rDotDashArray, std::function< void(const basegfx::B3DPolygon &rSnippet)> aLineTargetCallback, double fDotDashLength=0.0) |
Apply given LineDashing to given polygon. More... | |
B3DPolygon | applyDefaultNormalsSphere (const B3DPolygon &rCandidate, const B3DPoint &rCenter) |
Create/replace normals for given 3d geometry with default normals from given center to outside. More... | |
B3DPolygon | invertNormals (const B3DPolygon &rCandidate) |
invert normals for given 3d geometry. More... | |
B3DPolygon | applyDefaultTextureCoordinatesParallel (const B3DPolygon &rCandidate, const B3DRange &rRange, bool bChangeX, bool bChangeY) |
Create/replace texture coordinates for given 3d geometry with parallel projected one rRange: the full range of the 3d geometry If bChangeX, x texture coordinate will be recalculated. More... | |
B3DPolygon | applyDefaultTextureCoordinatesSphere (const B3DPolygon &rCandidate, const B3DPoint &rCenter, bool bChangeX, bool bChangeY) |
Create/replace texture coordinates for given 3d geometry with spherical one rCenter: the centre of the used 3d geometry If bChangeX, x texture coordinate will be recalculated. More... | |
bool | isInside (const B3DPolygon &rCandidate, const B3DPoint &rPoint, bool bWithBorder) |
bool | isPointOnLine (const B3DPoint &rStart, const B3DPoint &rEnd, const B3DPoint &rCandidate, bool bWithPoints) |
bool | isPointOnPolygon (const B3DPolygon &rCandidate, const B3DPoint &rPoint) |
bool | getCutBetweenLineAndPlane (const B3DVector &rPlaneNormal, const B3DPoint &rPlanePoint, const B3DPoint &rEdgeStart, const B3DPoint &rEdgeEnd, double &fCut) |
B3DPolygon | snapPointsOfHorizontalOrVerticalEdges (const B3DPolygon &rCandidate) |
snap some polygon coordinates to discrete coordinates More... | |
B3DRange | getRange (const B3DPolyPolygon &rCandidate) |
B3DPolyPolygon const & | createUnitCubePolyPolygon () |
Create a unit 3D line polyPolygon which defines a cube. More... | |
B3DPolyPolygon const & | createUnitCubeFillPolyPolygon () |
Create a unit 3D fill polyPolygon which defines a cube. More... | |
B3DPolyPolygon | createCubePolyPolygonFromB3DRange (const B3DRange &rRange) |
Create a 3D line polyPolygon from a B3DRange which defines a cube. More... | |
B3DPolyPolygon | createCubeFillPolyPolygonFromB3DRange (const B3DRange &rRange) |
Create a 3D fill polyPolygon from a B3DRange which defines a cube. More... | |
static B3DPoint | getPointFromCartesian (double fHor, double fVer) |
B3DPolyPolygon | createUnitSpherePolyPolygon (sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, double fVerStart=M_PI_2, double fVerStop=-M_PI_2, double fHorStart=0.0, double fHorStop=2 *M_PI) |
Create a unit 3D line polyPolygon which defines a sphere with the given count of hor and ver segments. More... | |
B3DPolyPolygon | createSpherePolyPolygonFromB3DRange (const B3DRange &rRange, sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, double fVerStart=M_PI_2, double fVerStop=-M_PI_2, double fHorStart=0.0, double fHorStop=2 *M_PI) |
Create a 3D line polyPolygon from a B3DRange which defines a sphere with the given count of hor and ver segments. More... | |
B3DPolyPolygon | createUnitSphereFillPolyPolygon (sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, bool bNormals=false, double fVerStart=M_PI_2, double fVerStop=-M_PI_2, double fHorStart=0.0, double fHorStop=2 *M_PI) |
same as createUnitSpherePolyPolygon, but creates filled polygons (closed and oriented) There is one extra, the bool bNormals defines if normals will be set, default is false More... | |
B3DPolyPolygon | createSphereFillPolyPolygonFromB3DRange (const B3DRange &rRange, sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, bool bNormals=false, double fVerStart=M_PI_2, double fVerStop=-M_PI_2, double fHorStart=0.0, double fHorStop=2 *M_PI) |
same as createSpherePolyPolygonFromB3DRange, but creates filled polygons (closed and oriented) There is one extra, the bool bNormals defines if normals will be set, default is false More... | |
B3DPolyPolygon | applyDefaultNormalsSphere (const B3DPolyPolygon &rCandidate, const B3DPoint &rCenter) |
Create/replace normals for given 3d geometry with default normals from given center to outside. More... | |
B3DPolyPolygon | invertNormals (const B3DPolyPolygon &rCandidate) |
invert normals for given 3d geometry. More... | |
B3DPolyPolygon | applyDefaultTextureCoordinatesParallel (const B3DPolyPolygon &rCandidate, const B3DRange &rRange, bool bChangeX=true, bool bChangeY=true) |
Create/replace texture coordinates for given 3d geometry with parallel projected one rRange: the full range of the 3d geometry If bChangeX, x texture coordinate will be recalculated. More... | |
B3DPolyPolygon | applyDefaultTextureCoordinatesSphere (const B3DPolyPolygon &rCandidate, const B3DPoint &rCenter, bool bChangeX=true, bool bChangeY=true) |
Create/replace texture coordinates for given 3d geometry with spherical one rCenter: the centre of the used 3d geometry If bChangeX, x texture coordinate will be recalculated. More... | |
bool | isInside (const B3DPolyPolygon &rCandidate, const B3DPoint &rPoint) |
B3DPolyPolygon | UnoPolyPolygonShape3DToB3DPolyPolygon (const css::drawing::PolyPolygonShape3D &rPolyPolygonShape3DSource) |
converters for css::drawing::PolyPolygonShape3D More... | |
void | B3DPolyPolygonToUnoPolyPolygonShape3D (const B3DPolyPolygon &rPolyPolygonSource, css::drawing::PolyPolygonShape3D &rPolyPolygonShape3DRetval) |
B2DPolyPolygon | solveCrossovers (const std::vector< B2DRange > &rRanges, const std::vector< B2VectorOrientation > &rOrientations) |
Extract poly-polygon w/o self-intersections from poly-range. More... | |
void | prepareColorStops (const basegfx::BGradient &rGradient, BColorStops &rColorStops, BColor &rSingleColor) |
void | synchronizeColorStops (BColorStops &rColorStops, BColorStops &rAlphaStops, const BColor &rSingleColor, const BColor &rSingleAlpha) |
sal_uInt32 | calculateNumberOfSteps (sal_uInt32 nRequestedSteps, const BColor &rStart, const BColor &rEnd) |
ODFGradientInfo | createLinearODFGradientInfo (const B2DRange &rTargetArea, sal_uInt32 nRequestedSteps, double fBorder, double fAngle) |
Create matrix for ODF's linear gradient definition. More... | |
ODFGradientInfo | createAxialODFGradientInfo (const B2DRange &rTargetArea, sal_uInt32 nRequestedSteps, double fBorder, double fAngle) |
Create matrix for ODF's axial gradient definition. More... | |
ODFGradientInfo | createRadialODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder) |
Create matrix for ODF's radial gradient definition. More... | |
ODFGradientInfo | createEllipticalODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder, double fAngle) |
Create matrix for ODF's elliptical gradient definition. More... | |
ODFGradientInfo | createSquareODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder, double fAngle) |
Create matrix for ODF's square gradient definition. More... | |
ODFGradientInfo | createRectangularODFGradientInfo (const B2DRange &rTargetArea, const B2DVector &rOffset, sal_uInt32 nRequestedSteps, double fBorder, double fAngle) |
Create matrix for ODF's rectangular gradient definition. More... | |
double | getLinearGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo) |
Calculate linear gradient blend value. More... | |
double | getAxialGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo) |
Calculate axial gradient blend value. More... | |
double | getRadialGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo) |
Calculate radial gradient blend value. More... | |
double | getEllipticalGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo) |
Calculate elliptical gradient blend value. More... | |
double | getSquareGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo) |
Calculate square gradient blend value. More... | |
double | getRectangularGradientAlpha (const B2DPoint &rUV, const ODFGradientInfo &rGradInfo) |
Calculate rectangular gradient blend value. More... | |
B2DPolyPolygon | number2PolyPolygon (double fVal, sal_Int32 nTotalDigits, sal_Int32 nDecPlaces, bool bLitSegments=true) |
Creates polypolygon with the given number as seven-segment digits. More... | |
void | infiniteLineFromParallelogram (::basegfx::B2DPoint &io_rLeftTop, ::basegfx::B2DPoint &io_rLeftBottom, ::basegfx::B2DPoint &io_rRightTop, ::basegfx::B2DPoint &io_rRightBottom, const ::basegfx::B2DRange &rFitTarget) |
Expand given parallelogram, such that it extends beyond bound rect in a given direction. More... | |
B2DHomMatrix | createScaleB2DHomMatrix (const B2DTuple &rScale) |
inline versions for parameters as tuples More... | |
B2DHomMatrix | createTranslateB2DHomMatrix (const B2DTuple &rTranslate) |
B2DHomMatrix | createScaleShearXRotateTranslateB2DHomMatrix (const B2DTuple &rScale, double fShearX, double fRadiant, const B2DTuple &rTranslate) |
B2DHomMatrix | createShearXRotateTranslateB2DHomMatrix (double fShearX, double fRadiant, const B2DTuple &rTranslate) |
B2DHomMatrix | createScaleTranslateB2DHomMatrix (const B2DTuple &rScale, const B2DTuple &rTranslate) |
B2DHomMatrix | createRotateAroundPoint (const B2DTuple &rPoint, double fRadiant) |
BASEGFX_DLLPUBLIC void | applyLineDashing (const B2DPolygon &rCandidate, const ::std::vector< double > &rDotDashArray, B2DPolyPolygon *pLineTarget, B2DPolyPolygon *pGapTarget=nullptr, double fDotDashLength=0.0) |
BASEGFX_DLLPUBLIC void | applyLineDashing (const B2DPolyPolygon &rCandidate, const ::std::vector< double > &rDotDashArray, B2DPolyPolygon *pLineTarget, double fFullDashDotLen=0.0) |
Apply given LineDashing to given polyPolygon. More... | |
BASEGFX_DLLPUBLIC void | applyLineDashing (const B3DPolygon &rCandidate, const ::std::vector< double > &rDotDashArray, B3DPolyPolygon *pLineTarget, double fDotDashLength=0.0) |
template<typename ValueType > | |
ValueType | lerp (const ValueType &rFrom, const ValueType &rTo, double t) |
Generic linear interpolator. More... | |
template<class Point , class Rect > | |
sal_uInt32 | getCohenSutherlandClipFlags (const Point &rP, const Rect &rR) |
Calc clip mask for Cohen-Sutherland rectangle clip. More... | |
template<class Point > | |
sal_uInt32 | getCohenSutherlandClipFlags (const Point &rP, const B2IBox &rB) |
Cohen-Sutherland mask calculation - overload for boxes. More... | |
the PointIndexSet itself; it allows to define a 'selection'of points in a tools::PolyPolygon by giving the polygon and point index.
Adding points double makes no sense, hence the std::set
Definition at line 120 of file b2dpolypolygontools.hxx.
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::adaptiveSubdivideByAngle | ( | const B2DPolygon & | rCandidate, |
double | fAngleBound | ||
) |
Definition at line 243 of file b2dpolygontools.cxx.
References a, basegfx::B2DCubicBezier::adaptiveSubdivideByAngle(), ANGLE_BOUND_MINIMUM_VALUE, ANGLE_BOUND_START_VALUE, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), closeWithGeometryChange(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::fTools::less(), basegfx::B2DPolygon::reserve(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), basegfx::B2DCubicBezier::setStartPoint(), and basegfx::B2DCubicBezier::testAndSolveTrivialBezier().
Referenced by adaptiveSubdivideByAngle(), createB3DPolygonFromB2DPolygon(), growInNormalDirection(), and basegfx::triangulator::triangulate().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::adaptiveSubdivideByAngle | ( | const B2DPolyPolygon & | rCandidate, |
double | fAngleBound | ||
) |
Definition at line 142 of file b2dpolypolygontools.cxx.
References adaptiveSubdivideByAngle(), basegfx::B2DPolyPolygon::append(), and basegfx::B2DPolyPolygon::areControlPointsUsed().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::adaptiveSubdivideByDistance | ( | const B2DPolygon & | rCandidate, |
double | fDistanceBound, | ||
int | nRecurseLimit | ||
) |
Definition at line 160 of file b2dpolygontools.cxx.
References a, basegfx::B2DCubicBezier::adaptiveSubdivideByDistance(), basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), closeWithGeometryChange(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getControlPolygonLength(), basegfx::B2DCubicBezier::getEdgeLength(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::reserve(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), basegfx::B2DCubicBezier::setStartPoint(), and basegfx::B2DCubicBezier::testAndSolveTrivialBezier().
Referenced by adaptiveSubdivideByDistance(), and createLineTrapezoidFromB2DPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::adaptiveSubdivideByDistance | ( | const B2DPolyPolygon & | rCandidate, |
double | fDistanceBound, | ||
int | nRecurseLimit | ||
) |
Definition at line 116 of file b2dpolypolygontools.cxx.
References adaptiveSubdivideByDistance(), basegfx::B2DPolyPolygon::append(), and basegfx::B2DPolyPolygon::areControlPointsUsed().
B2DPolygon basegfx::utils::addPointsAtCuts | ( | const B2DPolygon & | rCandidate, |
const B2DPoint & | rStart, | ||
const B2DPoint & | rEnd | ||
) |
Definition at line 947 of file b2dpolygoncutandtouch.cxx.
References a, basegfx::B2DPolygon::count(), basegfx::Tuple2D< TYPE >::equal(), basegfx::Range2D< TYPE, TRAITS >::expand(), basegfx::B2DPolygon::getB2DRange(), basegfx::B2DPolygon::getBezierSegment(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), nCount, and basegfx::Range2D< TYPE, TRAITS >::overlaps().
Referenced by clipPolygonOnParallelAxis(), and clipPolyPolygonOnPolyPolygon().
B2DPolygon basegfx::utils::addPointsAtCuts | ( | const B2DPolygon & | rCandidate, |
const B2DPolyPolygon & | rPolyMask | ||
) |
Definition at line 994 of file b2dpolygoncutandtouch.cxx.
References a, basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), basegfx::Range2D< TYPE, TRAITS >::expand(), basegfx::B2DPolyPolygon::getB2DPolygon(), basegfx::B2DPolygon::getB2DRange(), basegfx::B2DPolyPolygon::getB2DRange(), basegfx::B2DPolygon::getBezierSegment(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), m, and basegfx::Range2D< TYPE, TRAITS >::overlaps().
B2DPolygon basegfx::utils::addPointsAtCutsAndTouches | ( | const B2DPolygon & | rCandidate, |
size_t * | pPointLimit | ||
) |
Definition at line 854 of file b2dpolygoncutandtouch.cxx.
References basegfx::B2DPolygon::count(), and SAL_WARN.
Referenced by addPointsAtCutsAndTouches().
B2DPolyPolygon basegfx::utils::addPointsAtCutsAndTouches | ( | const B2DPolyPolygon & | rCandidate, |
size_t * | pPointLimit | ||
) |
Definition at line 876 of file b2dpolygoncutandtouch.cxx.
References a, addPointsAtCutsAndTouches(), basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::getB2DPolygon(), getRange(), nCount, and SAL_WARN.
void basegfx::utils::addTriangleFan | ( | const B2DPolygon & | rCandidate, |
triangulator::B2DTriangleVector & | rTarget | ||
) |
Definition at line 2174 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), nCount, and rTarget.
Referenced by basegfx::triangulator::triangulate().
B3DPolygon basegfx::utils::applyDefaultNormalsSphere | ( | const B3DPolygon & | rCandidate, |
const B3DPoint & | rCenter | ||
) |
Create/replace normals for given 3d geometry with default normals from given center to outside.
rCandidate: the 3d geometry to change rCenter: the center of the 3d geometry
Definition at line 307 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::B3DPolygon::getB3DPoint(), basegfx::B3DVector::normalize(), and basegfx::B3DPolygon::setNormal().
Referenced by applyDefaultNormalsSphere().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::applyDefaultNormalsSphere | ( | const B3DPolyPolygon & | rCandidate, |
const B3DPoint & | rCenter | ||
) |
Create/replace normals for given 3d geometry with default normals from given center to outside.
rCandidate: the 3d geometry to change rCenter: the center of the 3d geometry
Definition at line 386 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::append(), and applyDefaultNormalsSphere().
B3DPolygon basegfx::utils::applyDefaultTextureCoordinatesParallel | ( | const B3DPolygon & | rCandidate, |
const B3DRange & | rRange, | ||
bool | bChangeX, | ||
bool | bChangeY | ||
) |
Create/replace texture coordinates for given 3d geometry with parallel projected one rRange: the full range of the 3d geometry If bChangeX, x texture coordinate will be recalculated.
If bChangeY, y texture coordinate will be recalculated.
Definition at line 336 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::fTools::equalZero(), basegfx::B3DPolygon::getB3DPoint(), basegfx::B3DRange::getHeight(), basegfx::B3DRange::getMinX(), basegfx::B3DRange::getMinY(), basegfx::B3DPolygon::getTextureCoordinate(), basegfx::B3DRange::getWidth(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::B3DPolygon::setTextureCoordinate(), basegfx::Tuple2D< TYPE >::setX(), and basegfx::Tuple2D< TYPE >::setY().
Referenced by applyDefaultTextureCoordinatesParallel().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::applyDefaultTextureCoordinatesParallel | ( | const B3DPolyPolygon & | rCandidate, |
const B3DRange & | rRange, | ||
bool | bChangeX = true , |
||
bool | bChangeY = true |
||
) |
Create/replace texture coordinates for given 3d geometry with parallel projected one rRange: the full range of the 3d geometry If bChangeX, x texture coordinate will be recalculated.
If bChangeY, y texture coordinate will be recalculated.
Definition at line 410 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::append(), and applyDefaultTextureCoordinatesParallel().
B3DPolygon basegfx::utils::applyDefaultTextureCoordinatesSphere | ( | const B3DPolygon & | rCandidate, |
const B3DPoint & | rCenter, | ||
bool | bChangeX, | ||
bool | bChangeY | ||
) |
Create/replace texture coordinates for given 3d geometry with spherical one rCenter: the centre of the used 3d geometry If bChangeX, x texture coordinate will be recalculated.
If bChangeY, y texture coordinate will be recalculated.
Definition at line 386 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::fTools::equal(), basegfx::fTools::equalZero(), basegfx::B3DPolygon::getB3DPoint(), basegfx::B3DRange::getCenter(), getRange(), basegfx::B3DPolygon::getTextureCoordinate(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getX(), basegfx::B3DVector::getXZLength(), basegfx::Tuple2D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), basegfx::B3DPolygon::setTextureCoordinate(), basegfx::Tuple2D< TYPE >::setX(), and basegfx::Tuple2D< TYPE >::setY().
Referenced by applyDefaultTextureCoordinatesSphere().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::applyDefaultTextureCoordinatesSphere | ( | const B3DPolyPolygon & | rCandidate, |
const B3DPoint & | rCenter, | ||
bool | bChangeX = true , |
||
bool | bChangeY = true |
||
) |
Create/replace texture coordinates for given 3d geometry with spherical one rCenter: the centre of the used 3d geometry If bChangeX, x texture coordinate will be recalculated.
If bChangeY, y texture coordinate will be recalculated.
Definition at line 422 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::append(), and applyDefaultTextureCoordinatesSphere().
BASEGFX_DLLPUBLIC void basegfx::utils::applyLineDashing | ( | const B2DPolygon & | rCandidate, |
const ::std::vector< double > & | rDotDashArray, | ||
B2DPolyPolygon * | pLineTarget, | ||
B2DPolyPolygon * | pGapTarget = nullptr , |
||
double | fDotDashLength = 0.0 |
||
) |
void basegfx::utils::applyLineDashing | ( | const B2DPolygon & | rCandidate, |
const std::vector< double > & | rDotDashArray, | ||
B2DPolyPolygon * | pLineTarget, | ||
B2DPolyPolygon * | pGapTarget, | ||
double | fDotDashLength | ||
) |
Definition at line 1114 of file b2dpolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), applyLineDashing(), and basegfx::B2DPolyPolygon::clear().
Referenced by applyLineDashing().
BASEGFX_DLLPUBLIC void basegfx::utils::applyLineDashing | ( | const B2DPolygon & | rCandidate, |
const std::vector< double > & | rDotDashArray, | ||
std::function< void(const basegfx::B2DPolygon &rSnippet)> | aLineTargetCallback, | ||
std::function< void(const basegfx::B2DPolygon &rSnippet)> | aGapTargetCallback = std::function< void(const basegfx::B2DPolygon &)>() , |
||
double | fDotDashLength = 0.0 |
||
) |
Apply given LineDashing to given polygon.
This method is used to cut down line polygons to the needed pieces when a dashing needs to be applied. It is now capable of keeping contained bezier segments. It is also capable of delivering line and non-line portions depending on what target polygons You provide. This is useful e.g. for dashed lines with two colors. If the last and the first snippet in one of the results have a common start/end ppoint, they will be merged to achieve as view as needed result line snippets. This is also relevant for further processing the results.
rCandidate | The polygon based on which the snippets will be created. |
rDotDashArray | The line pattern given as array of length values |
pLineTarget | The target for line snippets, e.g. the first entry will be a line segment with length rDotDashArray[0]. The given polygon will be emptied as preparation. |
pGapTarget | The target for gap snippets, e.g. the first entry will be a line segment with length rDotDashArray[1]. The given polygon will be emptied as preparation. |
fFullDashDotLen | The summed-up length of the rDotDashArray. If zero, it will be calculated internally. |
There is now a 2nd version that allows to provide callback functions that get called when a snippet of a line/gap is produced and needs to be added. This allows to use it like a 'pipeline'. When using this (e.g. the 1st version uses this internally to guarantee the same algorithm is used) it is not needed to accumulate a potentially huge number of polygons in the result-polyPolygons, but e.g. consume them directly in the caller. Example is rendering a dashed line but without creating the potentially huge amount of polygons. The 2nd version will also merge first/last line/gap snippets if the input polygon is closed and the start/end-points match accordingly - at the cost that this will be delivered last.
Definition at line 1204 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), basegfx::B2DPolygon::clear(), basegfx::B2DPolygon::count(), basegfx::B2DCubicBezierHelper::distanceToRelative(), basegfx::fTools::equalZero(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), basegfx::B2DCubicBezier::getEdgeLength(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DCubicBezierHelper::getLength(), getLength(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getStartPoint(), implHandleFirstLast(), implHandleSnippet(), interpolate(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::fTools::less(), basegfx::fTools::lessOrEqual(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), basegfx::B2DCubicBezier::setStartPoint(), basegfx::B2DCubicBezier::snippet(), basegfx::B2DCubicBezier::split(), and basegfx::B2DCubicBezier::testAndSolveTrivialBezier().
BASEGFX_DLLPUBLIC void basegfx::utils::applyLineDashing | ( | const B2DPolyPolygon & | rCandidate, |
const ::std::vector< double > & | rDotDashArray, | ||
B2DPolyPolygon * | pLineTarget, | ||
double | fFullDashDotLen = 0.0 |
||
) |
Apply given LineDashing to given polyPolygon.
For a description see applyLineDashing in b2dpolygontoos.hxx
void basegfx::utils::applyLineDashing | ( | const B2DPolyPolygon & | rCandidate, |
const std::vector< double > & | rDotDashArray, | ||
B2DPolyPolygon * | pLineTarget, | ||
double | fFullDashDotLen | ||
) |
Definition at line 211 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), applyLineDashing(), and basegfx::B2DPolyPolygon::count().
BASEGFX_DLLPUBLIC void basegfx::utils::applyLineDashing | ( | const B3DPolygon & | rCandidate, |
const ::std::vector< double > & | rDotDashArray, | ||
B3DPolyPolygon * | pLineTarget, | ||
double | fDotDashLength = 0.0 |
||
) |
void basegfx::utils::applyLineDashing | ( | const B3DPolygon & | rCandidate, |
const std::vector< double > & | rDotDashArray, | ||
B3DPolyPolygon * | pLineTarget, | ||
double | fDotDashLength | ||
) |
Definition at line 94 of file b3dpolygontools.cxx.
References basegfx::B3DPolyPolygon::append(), applyLineDashing(), and basegfx::B3DPolyPolygon::clear().
void basegfx::utils::applyLineDashing | ( | const B3DPolygon & | rCandidate, |
const std::vector< double > & | rDotDashArray, | ||
std::function< void(const basegfx::B3DPolygon &rSnippet)> | aLineTargetCallback, | ||
double | fDotDashLength = 0.0 |
||
) |
Apply given LineDashing to given polygon.
For a description see applyLineDashing in b2dpolygontoos.hxx Also 2nd version with callbacks, see comments in 2D version
Definition at line 173 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::append(), basegfx::B3DPolygon::clear(), basegfx::B3DPolygon::count(), basegfx::fTools::equalZero(), basegfx::B3DPolygon::getB3DPoint(), getLength(), implHandleFirstLast(), implHandleSnippet(), interpolate(), basegfx::B3DPolygon::isClosed(), basegfx::fTools::less(), and basegfx::fTools::lessOrEqual().
bool basegfx::utils::arePointsOnSameSideOfLine | ( | const B2DPoint & | rStart, |
const B2DPoint & | rEnd, | ||
const B2DPoint & | rCandidateA, | ||
const B2DPoint & | rCandidateB, | ||
bool | bWithLine | ||
) |
Definition at line 2146 of file b2dpolygontools.cxx.
References basegfx::B2DVector::cross().
Referenced by isPointInTriangle().
BASEGFX_DLLPUBLIC void basegfx::utils::B2DPolygonToUnoPointSequence | ( | const B2DPolygon & | rPolygon, |
css::drawing::PointSequence & | rPointSequenceRetval | ||
) |
Definition at line 3271 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::fround(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getDefaultAdaptiveSubdivision(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), and basegfx::B2DPolygon::isClosed().
Referenced by B2DPolyPolygonToUnoPointSequenceSequence().
void basegfx::utils::B2DPolygonToUnoPolygonBezierCoords | ( | const B2DPolygon & | rPolygon, |
css::drawing::PointSequence & | rPointSequenceRetval, | ||
css::drawing::FlagSequence & | rFlagSequenceRetval | ||
) |
Definition at line 3423 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::C1, basegfx::C2, basegfx::B2DPolygon::count(), basegfx::fround(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getContinuityInPoint(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), and basegfx::B2DCubicBezier::setStartPoint().
Referenced by B2DPolyPolygonToUnoPolyPolygonBezierCoords().
BASEGFX_DLLPUBLIC void basegfx::utils::B2DPolyPolygonToUnoPointSequenceSequence | ( | const B2DPolyPolygon & | rPolyPolygon, |
css::drawing::PointSequenceSequence & | rPointSequenceSequenceRetval | ||
) |
Definition at line 569 of file b2dpolypolygontools.cxx.
References B2DPolygonToUnoPointSequence(), basegfx::B2DPolyPolygon::count(), and nCount.
BASEGFX_DLLPUBLIC void basegfx::utils::B2DPolyPolygonToUnoPolyPolygonBezierCoords | ( | const B2DPolyPolygon & | rPolyPolygon, |
css::drawing::PolyPolygonBezierCoords & | rPolyPolygonBezierCoordsRetval | ||
) |
Definition at line 622 of file b2dpolypolygontools.cxx.
References B2DPolygonToUnoPolygonBezierCoords(), basegfx::B2DPolyPolygon::count(), and nCount.
BASEGFX_DLLPUBLIC void basegfx::utils::B3DHomMatrixToUnoHomogenMatrix | ( | const B3DHomMatrix & | rMatrixIn, |
com::sun::star::drawing::HomogenMatrix & | rMatrixOut | ||
) |
Definition at line 49 of file b3dhommatrixtools.cxx.
References basegfx::B3DHomMatrix::get().
BASEGFX_DLLPUBLIC void basegfx::utils::B3DPolyPolygonToUnoPolyPolygonShape3D | ( | const B3DPolyPolygon & | rPolyPolygonSource, |
css::drawing::PolyPolygonShape3D & | rPolyPolygonShape3DRetval | ||
) |
Definition at line 512 of file b3dpolypolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::B3DPolyPolygon::count(), basegfx::B3DPolygon::getB3DPoint(), basegfx::B3DPolyPolygon::getB3DPolygon(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), and basegfx::B3DPolygon::isClosed().
BASEGFX_DLLPUBLIC sal_uInt32 basegfx::utils::calculateNumberOfSteps | ( | sal_uInt32 | nRequestedSteps, |
const BColor & | rStart, | ||
const BColor & | rEnd | ||
) |
Definition at line 475 of file gradienttools.cxx.
References basegfx::BColor::getMaximumDistance().
Referenced by basegfx::BColorStops::getInterpolatedBColor().
BASEGFX_DLLPUBLIC void basegfx::utils::checkClosed | ( | B2DPolygon & | rCandidate | ) |
Check if given polygon is closed.
This is kind of a 'classic' method to support old polygon definitions. Those old polygon definitions define the closed state of the polygon using identical start and endpoints. This method corrects this (removes double start/end points) and sets the Closed()-state of the polygon correctly.
Definition at line 81 of file b2dpolygontools.cxx.
References closeWithGeometryChange(), basegfx::B2DPolygon::count(), and basegfx::B2DPolygon::getB2DPoint().
Referenced by UnoPointSequenceToB2DPolygon(), UnoPolygonBezierCoordsToB2DPolygon(), and UnoPolyPolygonShape3DToB3DPolyPolygon().
BASEGFX_DLLPUBLIC void basegfx::utils::checkClosed | ( | B3DPolygon & | rCandidate | ) |
Check if given polygon is closed.
This is kind of a 'classic' method to support old polygon definitions. Those old polygon definitions define the closed state of the polygon using identical start and endpoints. This method corrects this (removes double start/end points) and sets the Closed()-state of the polygon correctly.
Definition at line 34 of file b3dpolygontools.cxx.
References basegfx::B3DPolygon::count(), basegfx::B3DTuple::equal(), basegfx::B3DPolygon::getB3DPoint(), basegfx::B3DPolygon::remove(), and basegfx::B3DPolygon::setClosed().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::clipPolygonOnParallelAxis | ( | const B2DPolygon & | rCandidate, |
bool | bParallelToXAxis, | ||
bool | bAboveAxis, | ||
double | fValueOnOtherAxis, | ||
bool | bStroke | ||
) |
Definition at line 32 of file b2dpolygonclipper.cxx.
References a, addPointsAtCuts(), basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), basegfx::B2DPolygon::clear(), closeWithGeometryChange(), basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolyPolygon::getB2DPolygon(), basegfx::B2DPolygon::getBezierSegment(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::Range2D< TYPE, TRAITS >::getHeight(), basegfx::Range2D< TYPE, TRAITS >::getMaxX(), basegfx::Range2D< TYPE, TRAITS >::getMaxY(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), basegfx::Range2D< TYPE, TRAITS >::getMinY(), getRange(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::Range2D< TYPE, TRAITS >::getWidth(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::B2DCubicBezier::interpolatePoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::fTools::lessOrEqual(), basegfx::fTools::moreOrEqual(), basegfx::B2DPolyPolygon::remove(), and basegfx::B2DPolygon::removeDoublePoints().
Referenced by clipPolygonOnRange(), and clipPolyPolygonOnParallelAxis().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::clipPolygonOnPolyPolygon | ( | const B2DPolygon & | rCandidate, |
const B2DPolyPolygon & | rClip, | ||
bool | bInside, | ||
bool | bStroke | ||
) |
Definition at line 506 of file b2dpolygonclipper.cxx.
References clipPolyPolygonOnPolyPolygon(), basegfx::B2DPolygon::count(), and basegfx::B2DPolyPolygon::count().
Referenced by clipPolygonOnRange().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::clipPolygonOnRange | ( | const B2DPolygon & | rCandidate, |
const B2DRange & | rRange, | ||
bool | bInside, | ||
bool | bStroke | ||
) |
Definition at line 180 of file b2dpolygonclipper.cxx.
References clipPolygonOnParallelAxis(), clipPolygonOnPolyPolygon(), clipPolyPolygonOnParallelAxis(), basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), createPolygonFromRect(), basegfx::B2DPolyPolygon::getB2DPolygon(), basegfx::Range2D< TYPE, TRAITS >::getMaxX(), basegfx::Range2D< TYPE, TRAITS >::getMaxY(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), basegfx::Range2D< TYPE, TRAITS >::getMinY(), getRange(), basegfx::Range2D< TYPE, TRAITS >::isEmpty(), basegfx::Range2D< TYPE, TRAITS >::isInside(), and nCount.
Referenced by clipPolyPolygonOnRange().
B2DPolyPolygon basegfx::utils::clipPolyPolygonOnParallelAxis | ( | const B2DPolyPolygon & | rCandidate, |
bool | bParallelToXAxis, | ||
bool | bAboveAxis, | ||
double | fValueOnOtherAxis, | ||
bool | bStroke | ||
) |
Definition at line 163 of file b2dpolygonclipper.cxx.
References basegfx::B2DPolyPolygon::append(), clipPolygonOnParallelAxis(), and basegfx::B2DPolyPolygon::count().
Referenced by clipPolygonOnRange().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::clipPolyPolygonOnPolyPolygon | ( | const B2DPolyPolygon & | rCandidate, |
const B2DPolyPolygon & | rClip, | ||
bool | bInside, | ||
bool | bStroke, | ||
size_t * | pPointLimit | ||
) |
Definition at line 332 of file b2dpolygonclipper.cxx.
References addPointsAtCuts(), basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), basegfx::B2DPolygon::clear(), clipPolyPolygonOnRange(), correctOrientations(), basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), createPolygonFromRect(), basegfx::Range2D< TYPE, TRAITS >::equal(), basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DPolyPolygon::flip(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolyPolygon::getB2DPolygon(), basegfx::B2DPolyPolygon::getB2DRange(), basegfx::B2DPolygon::getBezierSegment(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::interpolatePoint(), basegfx::Range2D< TYPE, TRAITS >::intersect(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::Range2D< TYPE, TRAITS >::isEmpty(), isInside(), isRectangle(), basegfx::B2DPolyPolygon::remove(), basegfx::B2DPolygon::removeDoublePoints(), SAL_WARN, solveCrossovers(), stripDispensablePolygons(), and stripNeutralPolygons().
Referenced by clipPolygonOnPolyPolygon(), and clipPolyPolygonOnRange().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::clipPolyPolygonOnRange | ( | const B2DPolyPolygon & | rCandidate, |
const B2DRange & | rRange, | ||
bool | bInside, | ||
bool | bStroke | ||
) |
Definition at line 284 of file b2dpolygonclipper.cxx.
References basegfx::B2DPolyPolygon::append(), clipPolygonOnRange(), clipPolyPolygonOnPolyPolygon(), basegfx::B2DPolyPolygon::count(), createPolygonFromRect(), and basegfx::Range2D< TYPE, TRAITS >::isEmpty().
Referenced by clipPolyPolygonOnPolyPolygon().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::clipTriangleListOnRange | ( | const B2DPolygon & | rCandidate, |
const B2DRange & | rRange | ||
) |
Definition at line 629 of file b2dpolygonclipper.cxx.
References basegfx::B2DPolygon::append(), basegfx::utils::RectClipFlags::BOTTOM, basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::Range2D< TYPE, TRAITS >::getMaxX(), basegfx::Range2D< TYPE, TRAITS >::getMaxY(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), basegfx::Range2D< TYPE, TRAITS >::getMinY(), i, basegfx::Range2D< TYPE, TRAITS >::isInside(), basegfx::utils::RectClipFlags::LEFT, nIndex, basegfx::utils::RectClipFlags::RIGHT, scissorLineSegment(), and basegfx::utils::RectClipFlags::TOP.
BASEGFX_DLLPUBLIC void basegfx::utils::closeWithGeometryChange | ( | B2DPolygon & | rCandidate | ) |
Definition at line 63 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::isPrevControlPointUsed(), basegfx::B2DPolygon::remove(), basegfx::B2DPolygon::setClosed(), and basegfx::B2DPolygon::setPrevControlPoint().
Referenced by adaptiveSubdivideByAngle(), adaptiveSubdivideByDistance(), checkClosed(), clipPolygonOnParallelAxis(), and simplifyCurveSegments().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::correctOrientations | ( | const B2DPolyPolygon & | rCandidate | ) |
Definition at line 34 of file b2dpolypolygontools.cxx.
References a, basegfx::B2DPolyPolygon::count(), basegfx::B2DPolygon::flip(), basegfx::B2DPolyPolygon::getB2DPolygon(), getOrientation(), isInside(), nCount, basegfx::Negative, basegfx::Neutral, and basegfx::B2DPolyPolygon::setB2DPolygon().
Referenced by clipPolyPolygonOnPolyPolygon(), basegfx::utils::ImplB2DClipState::commitPendingRanges(), prepareForPolygonOperation(), and solvePolygonOperationXor().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::correctOutmostPolygon | ( | const B2DPolyPolygon & | rCandidate | ) |
Definition at line 72 of file b2dpolypolygontools.cxx.
References a, basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::getB2DPolygon(), isInside(), nCount, and basegfx::B2DPolyPolygon::setB2DPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::createAreaGeometry | ( | const B2DPolygon & | rCandidate, |
double | fHalfLineWidth, | ||
B2DLineJoin | eJoin, | ||
css::drawing::LineCap | eCap, | ||
double | fMaxAllowedAngle = basegfx::deg2rad(12.5) , |
||
double | fMaxPartOfEdge = 0.4 , |
||
double | fMiterMinimumAngle = basegfx::deg2rad(15.0) |
||
) |
create filled polygon geometry for lines with a line width
This method will create bezier based, fillable polygons which will resample the curve if it was extended for the given half line width. It will remove extrema positions from contained bezier segments and get as close as possible and defined by the given parameters to the ideal result.
It will check edges for trivial bezier to avoid unnecessary bezier polygons. Care is taken to produce the in-between polygon points (the ones original on the source polygon) since it has showed that without those, the raster converters leave non-filled gaps.
rCandidate | The source polygon defining the hairline polygon path |
fHalfLineWidth | The width of the line to one side |
eJoin | The LineJoin if the edges meeting in a point do not have a C1 or C2 continuity |
eCap | The kind of cap, which is added to the line. |
fMaxAllowedAngle | Allows to hand over the maximum allowed angle between an edge and it's control vectors. The smaller, the more subdivisions will be needed to create the filled geometry. Allowed range is cropped to [M_PI_2 .. 0.01 * M_PI_2]. |
fMaxPartOfEdge | Allows to influence from with relative length of a control vector compared to its edge a split is forced. The smaller, the more subdivisions will be needed to create the filled geometry. Allowed range is cropped to [1.0 .. 0.01] |
fMiterMinimumAngle | The minimum wanted angle between two edges when edge rounding is using miter. When an edge is smaller than this (tighter) the usual fallback to bevel is used. Allowed range is cropped to [M_PI .. 0.01 * M_PI]. |
Commit 51b5b93092d6231615de470c62494c24e54828a1 needs revert, we need the triangulation for X11 fat line drawing
pTriangles | If given, the method will additionally add the created geometry as B2DTriangle's |
Definition at line 844 of file b2dlinegeometry.cxx.
References a, basegfx::B2DVector::angle(), basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::count(), createPolygonFromCircle(), basegfx::fTools::equal(), basegfx::Tuple2D< TYPE >::equalZero(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DPolygon::getNextControlPoint(), getOrientation(), basegfx::getPerpendicular(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::getTangent(), basegfx::B2DPolygon::isClosed(), basegfx::Negative, basegfx::Neutral, basegfx::NONE, basegfx::B2DVector::normalize(), basegfx::Positive, basegfx::B2DPolygon::removeDoublePoints(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), and basegfx::B2DCubicBezier::setStartPoint().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::createAreaGeometryForLineStartEnd | ( | const B2DPolygon & | rCandidate, |
const B2DPolyPolygon & | rArrow, | ||
bool | bStart, | ||
double | fWidth, | ||
double | fCandidateLength, | ||
double | fDockingPosition, | ||
double * | pConsumedLength = nullptr , |
||
double | fShift = 0.0 |
||
) |
Create line start/end geometry element, mostly arrows and things like that.
rCandidate | The polygon which needs to get that line ends and needs to have two points at least. |
rArrow | The line start/end geometry. It is assumed that the tip is pointing upwards. Result will be rotated and scaled to fit. |
bStart | describes if creation is for start or end of candidate. |
fWidth | defines the size of the element, it's describing the target width in X of the arrow. |
fDockingPosition | needs to be in [0.0 ..1.0] range, where 0.0 means that the tip of the arrow will be aligned with the polygon start, 1.0 means the bottom. The default of 0.5 describes a centered arrow. |
pConsumedLength | Using this parameter it is possible to get back how much from the candidate geometry is overlapped by the created element (consumed). |
fCandidateLength | This should contain the length of rCandidate to allow work without again calculating the length (which may be expensive with beziers). If 0.0 is given, the length is calculated on demand. |
fShift | When it is necessary to count with the thickness of the line, it makes sense to move the start position slightly - so define the shift. |
Definition at line 37 of file b2dlinegeometry.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), createTranslateB2DHomMatrix(), basegfx::fTools::equalZero(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DRange::getCenter(), getLength(), basegfx::B2DRange::getMaximum(), basegfx::B2DRange::getMinimum(), getPositionAbsolute(), getRange(), basegfx::Range2D< TYPE, TRAITS >::getWidth(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::B2DHomMatrix::rotate(), basegfx::B2DHomMatrix::scale(), basegfx::B2DPolyPolygon::setClosed(), basegfx::B2DPolyPolygon::transform(), and basegfx::B2DHomMatrix::translate().
BASEGFX_DLLPUBLIC ODFGradientInfo basegfx::utils::createAxialODFGradientInfo | ( | const B2DRange & | rTargetArea, |
sal_uInt32 | nRequestedSteps, | ||
double | fBorder, | ||
double | fAngle | ||
) |
Create matrix for ODF's axial gradient definition.
Note that odf axial gradients are varying in y direction. Note further that you can map the axial gradient to a linear gradient (in case you want or need to avoid an extra gradient renderer), by using createLinearODFGradientInfo() instead, shifting the resulting texture transformation by 0.5 to the top and appending the same stop colors again, but mirrored.
o_rGradientInfo | Receives the calculated texture transformation matrix (for use with standard [0,1]x[0,1] texture coordinates) |
rTargetArea | Output area, needed for aspect ratio calculations and texture transformation |
nRequestedSteps | Number of gradient steps (from ODF) |
fBorder | Width of gradient border (from ODF) |
fAngle | Gradient angle (from ODF) |
Definition at line 509 of file gradienttools.cxx.
References basegfx::init1DGradientInfo().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::createB2DPolygonFromB3DPolygon | ( | const B3DPolygon & | rCandidate, |
const B3DHomMatrix & | rMat | ||
) |
Definition at line 2333 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B3DPolygon::count(), basegfx::B3DPolygon::getB3DPoint(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::B3DPolygon::isClosed(), basegfx::B3DHomMatrix::isIdentity(), nCount, and basegfx::B2DPolygon::setClosed().
Referenced by createB2DPolyPolygonFromB3DPolyPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::createB2DPolyPolygonFromB3DPolyPolygon | ( | const B3DPolyPolygon & | rCandidate, |
const B3DHomMatrix & | rMat | ||
) |
Definition at line 265 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), and createB2DPolygonFromB3DPolygon().
BASEGFX_DLLPUBLIC B3DPolygon basegfx::utils::createB3DPolygonFromB2DPolygon | ( | const B2DPolygon & | rCandidate, |
double | fZCoordinate | ||
) |
Definition at line 2308 of file b2dpolygontools.cxx.
References a, adaptiveSubdivideByAngle(), basegfx::B3DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), createB3DPolygonFromB2DPolygon(), basegfx::B2DPolygon::getB2DPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::B2DPolygon::isClosed(), and basegfx::B3DPolygon::setClosed().
Referenced by createB3DPolygonFromB2DPolygon(), and createB3DPolyPolygonFromB2DPolyPolygon().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::createB3DPolyPolygonFromB2DPolyPolygon | ( | const B2DPolyPolygon & | rCandidate, |
double | fZCoordinate | ||
) |
Definition at line 253 of file b2dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::append(), and createB3DPolygonFromB2DPolygon().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createCoordinateSystemTransform | ( | const B2DPoint & | rOrigin, |
const B2DVector & | rX, | ||
const B2DVector & | rY | ||
) |
create based on given CoordinateSystem which is defined by origin and x/yaxis
Definition at line 441 of file b2dhommatrixtools.cxx.
References basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::createCubeFillPolyPolygonFromB3DRange | ( | const B3DRange & | rRange | ) |
Create a 3D fill polyPolygon from a B3DRange which defines a cube.
Definition at line 183 of file b3dpolypolygontools.cxx.
References createUnitCubeFillPolyPolygon(), basegfx::B3DRange::getDepth(), basegfx::B3DRange::getHeight(), basegfx::B3DRange::getMinX(), basegfx::B3DRange::getMinY(), basegfx::B3DRange::getMinZ(), basegfx::B3DRange::getWidth(), basegfx::B3DRange::isEmpty(), basegfx::B3DPolyPolygon::removeDoublePoints(), basegfx::B3DHomMatrix::scale(), basegfx::B3DPolyPolygon::transform(), and basegfx::B3DHomMatrix::translate().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::createCubePolyPolygonFromB3DRange | ( | const B3DRange & | rRange | ) |
Create a 3D line polyPolygon from a B3DRange which defines a cube.
Definition at line 166 of file b3dpolypolygontools.cxx.
References createUnitCubePolyPolygon(), basegfx::B3DRange::getDepth(), basegfx::B3DRange::getHeight(), basegfx::B3DRange::getMinX(), basegfx::B3DRange::getMinY(), basegfx::B3DRange::getMinZ(), basegfx::B3DRange::getWidth(), basegfx::B3DRange::isEmpty(), basegfx::B3DPolyPolygon::removeDoublePoints(), basegfx::B3DHomMatrix::scale(), basegfx::B3DPolyPolygon::transform(), and basegfx::B3DHomMatrix::translate().
B2DPolygon basegfx::utils::createEdgesOfGivenLength | ( | const B2DPolygon & | rCandidate, |
double | fLength, | ||
double | fStart = 0.0 , |
||
double | fEnd = 0.0 |
||
) |
create edges of given length along given B2DPolygon
rCandidate | The polygon to move along. Points at the given polygon are created, starting at position fStart and stopping at less or equal to fEnd. The closed state is preserved. The polygon is subdivided if curve segments are included. That subdivision is the base for the newly created points. If the source is closed, the indirectly existing last edge may NOT have the given length. If the source is open, all edges will have the given length. You may use the last point of the original when You want to add the last edge Yourself. |
fLength | The length of the created edges. If less or equal zero, an empty polygon is returned. |
fStart | The start distance for the first to be generated point. Use 0.0 to get the original start point. Negative values are truncated to 0.0. |
fEnd | The maximum distance for the last point. No more points behind this distance will be created. Use 0.0 to process the whole polygon. Negative values are truncated to 0.0. It also needs to be more or equal to fStart, else it is truncated to fStart. |
Definition at line 2942 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::fTools::equalZero(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getDefaultAdaptiveSubdivision(), basegfx::B2DVector::getLength(), basegfx::B2DPolygon::isClosed(), basegfx::fTools::less(), basegfx::fTools::more(), and basegfx::B2DPolygon::setClosed().
Referenced by createWaveline().
BASEGFX_DLLPUBLIC ODFGradientInfo basegfx::utils::createEllipticalODFGradientInfo | ( | const B2DRange & | rTargetArea, |
const B2DVector & | rOffset, | ||
sal_uInt32 | nRequestedSteps, | ||
double | fBorder, | ||
double | fAngle | ||
) |
Create matrix for ODF's elliptical gradient definition.
o_rGradientInfo | Receives the calculated texture transformation matrix (for use with standard [0,1]x[0,1] texture coordinates) |
rTargetArea | Output area, needed for aspect ratio calculations and texture transformation |
rOffset | Gradient offset value (from ODF) |
nRequestedSteps | Number of gradient steps (from ODF) |
fBorder | Width of gradient border (from ODF) |
fAngle | Gradient angle (from ODF) |
Definition at line 538 of file gradienttools.cxx.
References basegfx::initEllipticalGradientInfo().
B2DPolygon const & basegfx::utils::createHalfUnitCircle | ( | ) |
create half circle centered on (0,0) from [0 .. M_PI]
Definition at line 1756 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), createRotateB2DHomMatrix(), impDistanceBezierPointToControl(), and STEPSPERQUARTER.
BASEGFX_DLLPUBLIC ODFGradientInfo basegfx::utils::createLinearODFGradientInfo | ( | const B2DRange & | rTargetArea, |
sal_uInt32 | nRequestedSteps, | ||
double | fBorder, | ||
double | fAngle | ||
) |
Create matrix for ODF's linear gradient definition.
Note that odf linear gradients are varying in y direction.
o_rGradientInfo | Receives the calculated texture transformation matrix (for use with standard [0,1]x[0,1] texture coordinates) |
rTargetArea | Output area, needed for aspect ratio calculations and texture transformation |
nRequestedSteps | Number of gradient steps (from ODF) |
fBorder | Width of gradient border (from ODF) |
fAngle | Gradient angle (from ODF) |
Definition at line 495 of file gradienttools.cxx.
References basegfx::init1DGradientInfo().
void basegfx::utils::createLineTrapezoidFromB2DPolygon | ( | B2DTrapezoidVector & | ro_Result, |
const B2DPolygon & | rPolygon, | ||
double | fLineWidth | ||
) |
Definition at line 1119 of file b2dtrapezoid.cxx.
References a, adaptiveSubdivideByDistance(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), createLineTrapezoidFromEdge(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::isClosed(), and basegfx::fTools::lessOrEqual().
void basegfx::utils::createLineTrapezoidFromEdge | ( | B2DTrapezoidVector & | ro_Result, |
const B2DPoint & | rPointA, | ||
const B2DPoint & | rPointB, | ||
double | fLineWidth | ||
) |
Definition at line 946 of file b2dtrapezoid.cxx.
References basegfx::Tuple2D< TYPE >::equal(), basegfx::fTools::equal(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::fTools::lessOrEqual(), basegfx::fTools::more(), and basegfx::B2DVector::setLength().
Referenced by createLineTrapezoidFromB2DPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::createNonzeroConform | ( | const B2DPolyPolygon & | rCandidate | ) |
Emulate nonzero winding rule filling.
Geometrically convert PolyPolygons which are proposed to use nonzero fill rule to a representation where evenodd paint will give the same result. To do this all intersections and self-intersections get solved (the polygons will be rearranged if needed). Then all polygons which are inside another one with the same orientation get deleted
Definition at line 710 of file b2dpolypolygoncutter.cxx.
References a, basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::clear(), basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::getB2DPolygon(), getOrientation(), getRange(), isInside(), nCount, basegfx::Negative, SAL_WARN, solveCrossovers(), and stripNeutralPolygons().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::createPolygonFromCircle | ( | const B2DPoint & | rCenter, |
double | fRadius | ||
) |
Create a circle polygon with given radius.
This method creates a circle approximation consisting of 12 cubic bezier segments, which approximate the given circle with an error of less than 0.5 percent.
rCenter | Center point of the circle |
fRadius | Radius of the circle |
Definition at line 1717 of file b2dpolygontools.cxx.
References createPolygonFromEllipse().
Referenced by createAreaGeometry(), and createSevenSegmentPolyPolygon().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::createPolygonFromEllipse | ( | const B2DPoint & | rCenter, |
double | fRadiusX, | ||
double | fRadiusY, | ||
sal_uInt32 | nStartQuadrant = 0 |
||
) |
Create an ellipse polygon with given radii.
This method creates an ellipse approximation consisting of 12 cubic bezier segments, which approximate the given ellipse with an error of less than 0.5 percent.
rCenter | Center point of the circle |
fRadiusX | Radius of the ellipse in X direction |
fRadiusY | Radius of the ellipse in Y direction |
nStartQuadrant | With Y down on screens, 0 = 3 o'clock, 1 = 6 o'clock, 2 = 9 o'clock, 3 = 12 o'clock |
Definition at line 1810 of file b2dpolygontools.cxx.
References createPolygonFromUnitCircle(), createScaleTranslateB2DHomMatrix(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), and basegfx::B2DPolygon::transform().
Referenced by createPolygonFromCircle(), and createPolygonFromRect().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::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.
Definition at line 1920 of file b2dpolygontools.cxx.
References createPolygonFromUnitEllipseSegment(), createScaleTranslateB2DHomMatrix(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), and basegfx::B2DPolygon::transform().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::createPolygonFromRect | ( | const B2DRectangle & | rRect | ) |
Create a polygon from a rectangle.
Definition at line 1684 of file b2dpolygontools.cxx.
References basegfx::Range2D< TYPE, TRAITS >::getMaxX(), basegfx::Range2D< TYPE, TRAITS >::getMaxY(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), and basegfx::Range2D< TYPE, TRAITS >::getMinY().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::createPolygonFromRect | ( | const B2DRectangle & | rRect, |
double | fRadiusX, | ||
double | fRadiusY | ||
) |
Create a polygon from a rectangle.
rRect | The rectangle which describes the polygon size |
fRadiusX | |
fRadiusY | Radius of the edge rounding, relative to the rectangle size. 0.0 means no rounding, 1.0 will lead to an ellipse |
Definition at line 1583 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), createPolygonFromEllipse(), basegfx::B2DRange::getCenter(), basegfx::Range2D< TYPE, TRAITS >::getHeight(), basegfx::Range2D< TYPE, TRAITS >::getMaxX(), basegfx::Range2D< TYPE, TRAITS >::getMaxY(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), basegfx::Range2D< TYPE, TRAITS >::getMinY(), basegfx::Range2D< TYPE, TRAITS >::getWidth(), basegfx::Tuple2D< TYPE >::getX(), impDistanceBezierPointToControl(), interpolate(), basegfx::B2DPolygon::removeDoublePoints(), and basegfx::B2DPolygon::setClosed().
Referenced by clipPolygonOnRange(), clipPolyPolygonOnPolyPolygon(), clipPolyPolygonOnRange(), basegfx::utils::ImplB2DClipState::commitPendingPolygons(), basegfx::utils::ImplB2DClipState::commitPendingRanges(), and solvePolygonOperationAnd().
BASEGFX_DLLPUBLIC B2DPolygon const & basegfx::utils::createPolygonFromUnitCircle | ( | sal_uInt32 | nStartQuadrant = 0 | ) |
create a polygon which describes the unit circle and close it
nStartQuadrant | To be able to rebuild the old behaviour where the circles started at bottom, this parameter is used. Default is 0 which is the first quadrant and the polygon's start point will be the rightmost one. When using e.g. 1, the first created quadrant will start at the YMax-position (with Y down on screens, this is the lowest one). This is needed since when lines are dashed, toe old geometry started at bottom point, else it would look different. |
Definition at line 1780 of file b2dpolygontools.cxx.
References impCreateUnitCircle().
Referenced by createPolygonFromEllipse().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::createPolygonFromUnitEllipseSegment | ( | double | fStart, |
double | fEnd | ||
) |
Definition at line 1820 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), basegfx::fTools::equal(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), impDistanceBezierPointToControl(), basegfx::fTools::less(), basegfx::fTools::more(), basegfx::fTools::moreOrEqual(), basegfx::B2DPolygon::removeDoublePoints(), and STEPSPERQUARTER.
Referenced by createPolygonFromEllipseSegment(), and importFromSvgD().
BASEGFX_DLLPUBLIC ODFGradientInfo basegfx::utils::createRadialODFGradientInfo | ( | const B2DRange & | rTargetArea, |
const B2DVector & | rOffset, | ||
sal_uInt32 | nRequestedSteps, | ||
double | fBorder | ||
) |
Create matrix for ODF's radial gradient definition.
o_rGradientInfo | Receives the calculated texture transformation matrix (for use with standard [0,1]x[0,1] texture coordinates) |
rTargetArea | Output area, needed for aspect ratio calculations and texture transformation |
rOffset | Gradient offset value (from ODF) |
nRequestedSteps | Number of gradient steps (from ODF) |
fBorder | Width of gradient border (from ODF) |
fAngle | Gradient angle (from ODF) |
Definition at line 523 of file gradienttools.cxx.
References basegfx::initEllipticalGradientInfo().
BASEGFX_DLLPUBLIC ODFGradientInfo basegfx::utils::createRectangularODFGradientInfo | ( | const B2DRange & | rTargetArea, |
const B2DVector & | rOffset, | ||
sal_uInt32 | nRequestedSteps, | ||
double | fBorder, | ||
double | fAngle | ||
) |
Create matrix for ODF's rectangular gradient definition.
o_rGradientInfo | Receives the calculated texture transformation matrix (for use with standard [0,1]x[0,1] texture coordinates) |
rTargetArea | Output area, needed for aspect ratio calculations and texture transformation |
rOffset | Gradient offset value (from ODF) |
nRequestedSteps | Number of gradient steps (from ODF) |
fBorder | Width of gradient border (from ODF) |
fAngle | Gradient angle (from ODF) |
Definition at line 570 of file gradienttools.cxx.
References basegfx::initRectGradientInfo().
B2DHomMatrix basegfx::utils::createRotateAroundCenterKeepAspectRatioStayInsideRange | ( | const basegfx::B2DRange & | rTargetRange, |
double | fRotate | ||
) |
special for creating a mapping for a Range rotated around it's center while keeping AspectRatio unchanged and staying inside the given Range by optimally using the available space (no overlap or outside allowed)
Definition at line 358 of file b2dhommatrixtools.cxx.
References createScaleTranslateB2DHomMatrix(), basegfx::Range2D< TYPE, TRAITS >::getCenterX(), basegfx::Range2D< TYPE, TRAITS >::getCenterY(), basegfx::Range2D< TYPE, TRAITS >::getHeight(), basegfx::B2DRange::getMinimum(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), basegfx::Range2D< TYPE, TRAITS >::getMinY(), basegfx::B2DRange::getRange(), basegfx::Range2D< TYPE, TRAITS >::getWidth(), basegfx::B2DHomMatrix::rotate(), basegfx::B2DHomMatrix::scale(), basegfx::B2DRange::transform(), and basegfx::B2DHomMatrix::translate().
|
inline |
Definition at line 120 of file b2dhommatrixtools.hxx.
References createRotateAroundPoint(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createRotateAroundPoint | ( | double | fPointX, |
double | fPointY, | ||
double | fRadiant | ||
) |
special for the often used case of rotation around a point
Definition at line 333 of file b2dhommatrixtools.cxx.
References createSinCosOrthogonal(), basegfx::fTools::equalZero(), and basegfx::B2DHomMatrix::set3x2().
Referenced by createRotateAroundPoint(), basegfx::init1DGradientInfo(), basegfx::initEllipticalGradientInfo(), and basegfx::initRectGradientInfo().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createRotateB2DHomMatrix | ( | double | fRadiant | ) |
Definition at line 111 of file b2dhommatrixtools.cxx.
References createSinCosOrthogonal(), basegfx::fTools::equalZero(), and basegfx::B2DHomMatrix::set().
Referenced by createHalfUnitCircle(), impCreateUnitCircle(), and importFromSvgD().
|
inline |
inline versions for parameters as tuples
Definition at line 54 of file b2dhommatrixtools.hxx.
References createScaleB2DHomMatrix(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createScaleB2DHomMatrix | ( | double | fScaleX, |
double | fScaleY | ||
) |
Tooling methods for on-the-fly matrix generation e.g.
for inline multiplications
Definition at line 69 of file b2dhommatrixtools.cxx.
References basegfx::fTools::equal(), and basegfx::B2DHomMatrix::set().
Referenced by createScaleB2DHomMatrix(), and importFromSvgD().
|
inline |
Definition at line 76 of file b2dhommatrixtools.hxx.
References createScaleShearXRotateTranslateB2DHomMatrix(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix | ( | double | fScaleX, |
double | fScaleY, | ||
double | fShearX, | ||
double | fRadiant, | ||
double | fTranslateX, | ||
double | fTranslateY | ||
) |
Tooling methods for faster completely combined matrix creation when scale, shearX, rotation and translation needs to be done in exactly that order.
It's faster since it directly calculates each matrix value based on a symbolic calculation of the three matrix multiplications. Inline versions for parameters as tuples added, too.
no scale, take shortcut
scale used
no shear
no rotate, take shortcut
rotate and scale used, no shear
scale and shear used
scale and shear, but no rotate
scale, shear and rotate used
Definition at line 143 of file b2dhommatrixtools.cxx.
References createScaleTranslateB2DHomMatrix(), createShearXRotateTranslateB2DHomMatrix(), createSinCosOrthogonal(), basegfx::fTools::equal(), and basegfx::fTools::equalZero().
Referenced by createScaleShearXRotateTranslateB2DHomMatrix(), and basegfx::utils::B2DHomMatrixBufferedDecompose::getB2DHomMatrix().
|
inline |
Definition at line 107 of file b2dhommatrixtools.hxx.
References createScaleTranslateB2DHomMatrix(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createScaleTranslateB2DHomMatrix | ( | double | fScaleX, |
double | fScaleY, | ||
double | fTranslateX, | ||
double | fTranslateY | ||
) |
no scale, take shortcut
scale used
no translate, but scale.
translate and scale
Definition at line 293 of file b2dhommatrixtools.cxx.
References createTranslateB2DHomMatrix(), basegfx::fTools::equal(), basegfx::fTools::equalZero(), and basegfx::B2DHomMatrix::set().
Referenced by createPolygonFromEllipse(), createPolygonFromEllipseSegment(), createRotateAroundCenterKeepAspectRatioStayInsideRange(), createScaleShearXRotateTranslateB2DHomMatrix(), and createScaleTranslateB2DHomMatrix().
B2DPolyPolygon basegfx::utils::createSevenSegmentPolyPolygon | ( | char | cNumber, |
bool | bLitSegments | ||
) |
Creates polypolygon for seven-segment display number.
This function takes an integer number between 0 and 9 and convert it into the well-known seven-segment display number (like most digital clocks show their numbers). The digit will exactly fit the unit rectangle. The polypolygon will be a line polygon, i.e. if you need the segment parts to have width, use createAreaGeometry() on the result.
cNumber | Number from '0' to '9' as ASCII char, or '-', 'E' and '.' to convert to 7 segment code |
bLitSegments | When true, return a polygon containing the segments that are 'lit' for the given number. Return un-lit segments otherwise. |
Definition at line 418 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::append(), basegfx::B2DPolygon::clear(), createPolygonFromCircle(), end, i, and start.
Referenced by number2PolyPolygon().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createShearXB2DHomMatrix | ( | double | fShearX | ) |
Definition at line 87 of file b2dhommatrixtools.cxx.
References basegfx::fTools::equalZero(), and basegfx::B2DHomMatrix::set().
|
inline |
Definition at line 93 of file b2dhommatrixtools.hxx.
References createShearXRotateTranslateB2DHomMatrix(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createShearXRotateTranslateB2DHomMatrix | ( | double | fShearX, |
double | fRadiant, | ||
double | fTranslateX, | ||
double | fTranslateY | ||
) |
no shear
no shear, no rotate, take shortcut
no shear, but rotate used
shear used
no rotate, but shear used
shear and rotate used
Definition at line 224 of file b2dhommatrixtools.cxx.
References createSinCosOrthogonal(), createTranslateB2DHomMatrix(), and basegfx::fTools::equalZero().
Referenced by createScaleShearXRotateTranslateB2DHomMatrix(), and createShearXRotateTranslateB2DHomMatrix().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createShearYB2DHomMatrix | ( | double | fShearY | ) |
Definition at line 99 of file b2dhommatrixtools.cxx.
References basegfx::fTools::equalZero(), and basegfx::B2DHomMatrix::set().
void basegfx::utils::createSinCosOrthogonal | ( | double & | o_rSin, |
double & | rCos, | ||
double | fRadiant | ||
) |
If the rotation angle is an approximate multiple of pi/2, force fSin/fCos to -1/0/1, to maintain orthogonality (which might also be advantageous for the other cases, but: for multiples of pi/2, the exact values can be attained.
It would be largely unintuitive, if a 180 degrees rotation would introduce slight roundoff errors, instead of exactly mirroring the coordinate system)
Definition at line 27 of file b2dhommatrixtools.cxx.
References basegfx::fTools::equalZero(), and basegfx::fround().
Referenced by createRotateAroundPoint(), createRotateB2DHomMatrix(), createScaleShearXRotateTranslateB2DHomMatrix(), createShearXRotateTranslateB2DHomMatrix(), and basegfx::B2DHomMatrix::rotate().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createSourceRangeTargetRangeTransform | ( | const B2DRange & | rSourceRange, |
const B2DRange & | rTargetRange | ||
) |
special for the case to map from source range to target range
Definition at line 402 of file b2dhommatrixtools.cxx.
References basegfx::fTools::equal(), basegfx::fTools::equalZero(), basegfx::Range2D< TYPE, TRAITS >::getHeight(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), basegfx::Range2D< TYPE, TRAITS >::getMinY(), basegfx::Range2D< TYPE, TRAITS >::getWidth(), basegfx::B2DHomMatrix::scale(), basegfx::B2DHomMatrix::set(), and basegfx::B2DHomMatrix::translate().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::createSphereFillPolyPolygonFromB3DRange | ( | const B3DRange & | rRange, |
sal_uInt32 | nHorSeg, | ||
sal_uInt32 | nVerSeg, | ||
bool | bNormals, | ||
double | fVerStart, | ||
double | fVerStop, | ||
double | fHorStart, | ||
double | fHorStop | ||
) |
same as createSpherePolyPolygonFromB3DRange, but creates filled polygons (closed and oriented) There is one extra, the bool bNormals defines if normals will be set, default is false
Definition at line 365 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::count(), createUnitSphereFillPolyPolygon(), basegfx::B3DRange::getDepth(), basegfx::B3DRange::getHeight(), basegfx::B3DRange::getMinX(), basegfx::B3DRange::getMinY(), basegfx::B3DRange::getMinZ(), basegfx::B3DRange::getWidth(), basegfx::B3DHomMatrix::scale(), basegfx::B3DPolyPolygon::transform(), and basegfx::B3DHomMatrix::translate().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::createSpherePolyPolygonFromB3DRange | ( | const B3DRange & | rRange, |
sal_uInt32 | nHorSeg, | ||
sal_uInt32 | nVerSeg, | ||
double | fVerStart = M_PI_2 , |
||
double | fVerStop = -M_PI_2 , |
||
double | fHorStart = 0.0 , |
||
double | fHorStop = 2 *M_PI |
||
) |
Create a 3D line polyPolygon from a B3DRange which defines a sphere with the given count of hor and ver segments.
If nHorSeg == 0 and/or nVerSeg == 0, a default will be calculated to have a step at least each 15 degrees. With VerStart, VerStop and hor range in cartesian may be specified to create a partial sphere only.
Definition at line 287 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::count(), createUnitSpherePolyPolygon(), basegfx::B3DRange::getDepth(), basegfx::B3DRange::getHeight(), basegfx::B3DRange::getMinX(), basegfx::B3DRange::getMinY(), basegfx::B3DRange::getMinZ(), basegfx::B3DRange::getWidth(), basegfx::B3DHomMatrix::scale(), basegfx::B3DPolyPolygon::transform(), and basegfx::B3DHomMatrix::translate().
BASEGFX_DLLPUBLIC ODFGradientInfo basegfx::utils::createSquareODFGradientInfo | ( | const B2DRange & | rTargetArea, |
const B2DVector & | rOffset, | ||
sal_uInt32 | nRequestedSteps, | ||
double | fBorder, | ||
double | fAngle | ||
) |
Create matrix for ODF's square gradient definition.
o_rGradientInfo | Receives the calculated texture transformation matrix (for use with standard [0,1]x[0,1] texture coordinates) |
rTargetArea | Output area, needed for aspect ratio calculations and texture transformation |
rOffset | Gradient offset value (from ODF) |
nRequestedSteps | Number of gradient steps (from ODF) |
fBorder | Width of gradient border (from ODF) |
fAngle | Gradient angle (from ODF) |
Definition at line 554 of file gradienttools.cxx.
References basegfx::initRectGradientInfo().
|
inline |
Definition at line 59 of file b2dhommatrixtools.hxx.
References createTranslateB2DHomMatrix(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DHomMatrix basegfx::utils::createTranslateB2DHomMatrix | ( | double | fTranslateX, |
double | fTranslateY | ||
) |
Definition at line 130 of file b2dhommatrixtools.cxx.
References basegfx::fTools::equalZero(), and basegfx::B2DHomMatrix::set().
Referenced by basegfx::unotools::UnoPolyPolygon::addPolyPolygon(), createAreaGeometryForLineStartEnd(), createScaleTranslateB2DHomMatrix(), createShearXRotateTranslateB2DHomMatrix(), and createTranslateB2DHomMatrix().
B3DPolyPolygon const & basegfx::utils::createUnitCubeFillPolyPolygon | ( | ) |
Create a unit 3D fill polyPolygon which defines a cube.
Definition at line 93 of file b3dpolypolygontools.cxx.
References A, basegfx::B3DPolygon::append(), basegfx::B3DPolyPolygon::append(), B, C, basegfx::B3DPolygon::clear(), D, E, F, G, H, and basegfx::B3DPolygon::setClosed().
Referenced by createCubeFillPolyPolygonFromB3DRange().
B3DPolyPolygon const & basegfx::utils::createUnitCubePolyPolygon | ( | ) |
Create a unit 3D line polyPolygon which defines a cube.
Definition at line 49 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolygon::append(), basegfx::B3DPolyPolygon::append(), basegfx::B3DPolygon::clear(), and basegfx::B3DPolygon::setClosed().
Referenced by createCubePolyPolygonFromB3DRange().
BASEGFX_DLLPUBLIC B2DPolygon const & basegfx::utils::createUnitPolygon | ( | ) |
Create the unit polygon.
Definition at line 1699 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::setClosed().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::createUnitSphereFillPolyPolygon | ( | sal_uInt32 | nHorSeg, |
sal_uInt32 | nVerSeg, | ||
bool | bNormals, | ||
double | fVerStart, | ||
double | fVerStop, | ||
double | fHorStart, | ||
double | fHorStop | ||
) |
same as createUnitSpherePolyPolygon, but creates filled polygons (closed and oriented) There is one extra, the bool bNormals defines if normals will be set, default is false
Definition at line 307 of file b3dpolypolygontools.cxx.
References a, basegfx::B3DPolygon::append(), basegfx::B3DPolyPolygon::append(), basegfx::B3DPolygon::count(), basegfx::fround(), basegfx::B3DPolygon::getB3DPoint(), getPointFromCartesian(), nMaxSegments, nMinSegments, basegfx::B3DPolygon::setClosed(), and basegfx::B3DPolygon::setNormal().
Referenced by createSphereFillPolyPolygonFromB3DRange().
B3DPolyPolygon basegfx::utils::createUnitSpherePolyPolygon | ( | sal_uInt32 | nHorSeg, |
sal_uInt32 | nVerSeg, | ||
double | fVerStart = M_PI_2 , |
||
double | fVerStop = -M_PI_2 , |
||
double | fHorStart = 0.0 , |
||
double | fHorStop = 2 *M_PI |
||
) |
Create a unit 3D line polyPolygon which defines a sphere with the given count of hor and ver segments.
Result will be centered at (0.0, 0.0, 0.0) and sized [-1.0 .. 1.0] in all dimensions. If nHorSeg == 0 and/or nVerSeg == 0, a default will be calculated to have a step at least each 15 degrees. With VerStart, VerStop and hor range in cartesian may be specified to create a partial sphere only.
Definition at line 208 of file b3dpolypolygontools.cxx.
References a, basegfx::B3DPolygon::append(), basegfx::B3DPolyPolygon::append(), basegfx::fTools::equal(), basegfx::fround(), getPointFromCartesian(), nMaxSegments, nMinSegments, and basegfx::B3DPolygon::setClosed().
Referenced by createSpherePolyPolygonFromB3DRange().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::createWaveline | ( | const B2DPolygon & | rCandidate, |
double | fWaveWidth, | ||
double | fWaveHeight | ||
) |
Create Waveline along given polygon The implementation is based on createEdgesOfGivenLength and creates a curve segment with the given dimensions for each created line segment.
The polygon is treated as if opened (closed state will be ignored) and only for whole edges a curve segment will be created (no rest handling)
rCandidate | The polygon along which the waveline will be created |
fWaveWidth | The length of a single waveline curve segment |
fgWaveHeight | The height of the waveline (amplitude) |
Definition at line 3033 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), basegfx::B2DPolygon::count(), createEdgesOfGivenLength(), basegfx::fTools::equalZero(), basegfx::B2DPolygon::getB2DPoint(), and basegfx::getNormalizedPerpendicular().
BASEGFX_DLLPUBLIC B2DPoint basegfx::utils::distort | ( | const B2DPoint & | rCandidate, |
const B2DRange & | rOriginal, | ||
const B2DPoint & | rTopLeft, | ||
const B2DPoint & | rTopRight, | ||
const B2DPoint & | rBottomLeft, | ||
const B2DPoint & | rBottomRight | ||
) |
Definition at line 2475 of file b2dpolygontools.cxx.
References basegfx::fTools::equalZero(), basegfx::Range2D< TYPE, TRAITS >::getHeight(), basegfx::Range2D< TYPE, TRAITS >::getMinX(), basegfx::Range2D< TYPE, TRAITS >::getMinY(), basegfx::Range2D< TYPE, TRAITS >::getWidth(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
Referenced by distort().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::distort | ( | const B2DPolygon & | rCandidate, |
const B2DRange & | rOriginal, | ||
const B2DPoint & | rTopLeft, | ||
const B2DPoint & | rTopRight, | ||
const B2DPoint & | rBottomLeft, | ||
const B2DPoint & | rBottomRight | ||
) |
Definition at line 2496 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), distort(), basegfx::Tuple2D< TYPE >::equalZero(), basegfx::B2DPolygon::getB2DPoint(), basegfx::Range2D< TYPE, TRAITS >::getHeight(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::Range2D< TYPE, TRAITS >::getWidth(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::setClosed(), basegfx::B2DPolygon::setNextControlPoint(), and basegfx::B2DPolygon::setPrevControlPoint().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::distort | ( | const B2DPolyPolygon & | rCandidate, |
const B2DRange & | rOriginal, | ||
const B2DPoint & | rTopLeft, | ||
const B2DPoint & | rTopRight, | ||
const B2DPoint & | rBottomLeft, | ||
const B2DPoint & | rBottomRight | ||
) |
Definition at line 309 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), and distort().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::expandToCurve | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 2531 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::count(), and expandToCurveInPoint().
Referenced by expandToCurve().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::expandToCurve | ( | const B2DPolyPolygon & | rCandidate | ) |
Definition at line 321 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), and expandToCurve().
BASEGFX_DLLPUBLIC bool basegfx::utils::expandToCurveInPoint | ( | B2DPolygon & | rCandidate, |
sal_uInt32 | nIndex | ||
) |
Definition at line 2543 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), interpolate(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::isNextControlPointUsed(), basegfx::B2DPolygon::isPrevControlPointUsed(), nIndex, basegfx::B2DPolygon::setNextControlPoint(), and basegfx::B2DPolygon::setPrevControlPoint().
Referenced by expandToCurve().
BASEGFX_DLLPUBLIC OUString basegfx::utils::exportToSvgD | ( | const B2DPolyPolygon & | rPolyPoly, |
bool | bUseRelativeCoordinates, | ||
bool | bDetectQuadraticBeziers, | ||
bool | bHandleRelativeNextPointCompatible, | ||
bool | bOOXMLMotionPath = false |
||
) |
Export poly-polygon to SVG.
This function exports a poly-polygon into an SVG-D statement. Currently, output of relative point sequences is not yet supported (might cause slightly larger output)
rPolyPoly | The poly-polygon to export |
bUseRelativeCoordinates | When true, all coordinate values are exported as relative to the current position. This tends to save some space, since fewer digits needs to be written. |
bDetectQuadraticBeziers | When true, the export tries to detect cubic bezier segments in the input polygon, which can be represented by quadratic bezier segments. Note that the generated string causes versions prior to OOo2.0 to crash. |
bHandleRelativeNextPointCompatible | If set to true, the old error that after a relative 'z' command the current point was not reset to the first point of the current polygon is kept; this is needed to read odf files. If false, pure svg is used; this is needed for svg import. |
bOOXMLMotionPath | If set to true, export string format that is acceptable for for animation motion path for PowerPoint: always space delimited, never neglect command char, always end with E, and do not export H or V. |
Definition at line 715 of file b2dsvgpolypolygon.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::C2, basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolyPolygon::getB2DPolygon(), basegfx::B2DPolygon::getContinuityInPoint(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), i, basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::isNextControlPointUsed(), basegfx::B2DPolygon::isPrevControlPointUsed(), nCount, and nIndex.
BASEGFX_DLLPUBLIC OUString basegfx::utils::exportToSvgPoints | ( | const B2DPolygon & | rPoly | ) |
Write poly-polygon to SVG.
This function imports a non-bezier polygon to SVG points (a plain list of coordinate pairs).
rPoly | The polygon to export |
rSvgPointsAttribute | A valid SVG points attribute string |
Definition at line 692 of file b2dsvgpolypolygon.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), and SAL_WARN_IF.
BASEGFX_DLLPUBLIC CutFlagValue basegfx::utils::findCut | ( | const B2DPoint & | rEdge1Start, |
const B2DVector & | rEdge1Delta, | ||
const B2DPoint & | rEdge2Start, | ||
const B2DVector & | rEdge2Delta, | ||
CutFlagValue | aCutFlags, | ||
double * | pCut1, | ||
double * | pCut2 | ||
) |
Definition at line 866 of file b2dpolygontools.cxx.
References ALL, END1, END2, basegfx::Tuple2D< TYPE >::equal(), basegfx::fTools::equalZero(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), isPointOnEdge(), basegfx::fTools::less(), LINE, basegfx::fTools::more(), NONE, START1, and START2.
BASEGFX_DLLPUBLIC double basegfx::utils::getArea | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 426 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), getSignedArea(), and basegfx::fTools::less().
BASEGFX_DLLPUBLIC double basegfx::utils::getArea | ( | const B2DPolyPolygon & | rCandidate | ) |
Definition at line 206 of file b2dpolypolygontools.cxx.
References getSignedArea().
BASEGFX_DLLPUBLIC double basegfx::utils::getAxialGradientAlpha | ( | const B2DPoint & | rUV, |
const ODFGradientInfo & | rGradInfo | ||
) |
Calculate axial gradient blend value.
This method generates you the lerp alpha value for blending linearly between gradient start and end color, according to the formula (startCol*(1.0-alpha) + endCol*alpha)
rUV | Current uv coordinate. Values outside [0,1] will be clamped. Assumes gradient color varies along the y axis. |
rGradInfo | Gradient info, for transformation and number of steps |
Definition at line 609 of file gradienttools.cxx.
References basegfx::Tuple2D< TYPE >::getY().
|
inline |
Cohen-Sutherland mask calculation - overload for boxes.
Definition at line 59 of file rectcliptools.hxx.
References basegfx::B2IBox::getMaxX(), basegfx::B2IBox::getMaxY(), basegfx::B2IBox::getMinX(), basegfx::B2IBox::getMinY(), Point::getX(), and Point::getY().
|
inline |
Calc clip mask for Cohen-Sutherland rectangle clip.
This function returns a clip mask used for the Cohen-Sutherland rectangle clip method, where one or more of the lower four bits are set, if the given point is outside one or more of the four half planes defining the rectangle (see RectClipFlags for possible values)
Definition at line 45 of file rectcliptools.hxx.
References Point::getX(), and Point::getY().
Referenced by scissorLineSegment().
BASEGFX_DLLPUBLIC B2DTuple basegfx::utils::getColumn | ( | const B2DHomMatrix & | rMatrix, |
sal_uInt16 | nCol | ||
) |
get column vector from B2dHomMatrix, e.g. to extract coordinate system origin and x/yaxis
Definition at line 451 of file b2dhommatrixtools.cxx.
References basegfx::B2DHomMatrix::get().
BASEGFX_DLLPUBLIC B2VectorContinuity basegfx::utils::getContinuityInPoint | ( | const B2DPolygon & | rCandidate, |
sal_uInt32 | nIndex | ||
) |
Definition at line 155 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::getContinuityInPoint(), and nIndex.
BASEGFX_DLLPUBLIC bool basegfx::utils::getCutBetweenLineAndPlane | ( | const B3DVector & | rPlaneNormal, |
const B3DPoint & | rPlanePoint, | ||
const B3DPoint & | rEdgeStart, | ||
const B3DPoint & | rEdgeEnd, | ||
double & | fCut | ||
) |
Definition at line 746 of file b3dpolygontools.cxx.
References basegfx::B3DTuple::equal(), basegfx::B3DTuple::equalZero(), basegfx::fTools::equalZero(), and basegfx::B3DVector::scalar().
BASEGFX_DLLPUBLIC double basegfx::utils::getEdgeLength | ( | const B2DPolygon & | rCandidate, |
sal_uInt32 | nIndex | ||
) |
get length of polygon edge from point nIndex to nIndex + 1
Definition at line 444 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DVector::getLength(), basegfx::B2DCubicBezier::getLength(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), nIndex, basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), and basegfx::B2DCubicBezier::setStartPoint().
Referenced by getPositionAbsolute(), and getSnippetAbsolute().
BASEGFX_DLLPUBLIC double basegfx::utils::getEllipticalGradientAlpha | ( | const B2DPoint & | rUV, |
const ODFGradientInfo & | rGradInfo | ||
) |
Calculate elliptical gradient blend value.
This method generates you the lerp alpha value for blending linearly between gradient start and end color, according to the formula (startCol*(1.0-alpha) + endCol*alpha)
rUV | Current uv coordinate. Values outside [0,1] will be clamped. |
rGradInfo | Gradient info, for transformation and number of steps |
Definition at line 641 of file gradienttools.cxx.
References basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), and t.
BASEGFX_DLLPUBLIC sal_uInt32 basegfx::utils::getIndexOfPredecessor | ( | sal_uInt32 | nIndex, |
const B2DPolygon & | rCandidate | ||
) |
Definition at line 94 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::count(), and nIndex.
Referenced by getOrientationForIndex().
BASEGFX_DLLPUBLIC sal_uInt32 basegfx::utils::getIndexOfSuccessor | ( | sal_uInt32 | nIndex, |
const B2DPolygon & | rCandidate | ||
) |
Definition at line 112 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::count(), and nIndex.
Referenced by getLength(), getOrientationForIndex(), and getSmallestDistancePointToPolygon().
BASEGFX_DLLPUBLIC sal_uInt32 basegfx::utils::getIndexOfSuccessor | ( | sal_uInt32 | nIndex, |
const B3DPolygon & | rCandidate | ||
) |
Definition at line 44 of file b3dpolygontools.cxx.
References basegfx::B3DPolygon::count(), and nIndex.
BASEGFX_DLLPUBLIC double basegfx::utils::getLength | ( | const B2DPolygon & | rCandidate | ) |
get length of polygon
Definition at line 477 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DVector::getLength(), basegfx::B2DCubicBezier::getLength(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DPolygon::isClosed(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), and basegfx::B2DCubicBezier::setStartPoint().
Referenced by applyLineDashing(), createAreaGeometryForLineStartEnd(), getPositionAbsolute(), getPositionRelative(), getSnippetAbsolute(), and reSegmentPolygon().
BASEGFX_DLLPUBLIC double basegfx::utils::getLength | ( | const B3DPolygon & | rCandidate | ) |
Definition at line 72 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::B3DPolygon::getB3DPoint(), getIndexOfSuccessor(), basegfx::B3DVector::getLength(), and basegfx::B3DPolygon::isClosed().
BASEGFX_DLLPUBLIC double basegfx::utils::getLinearGradientAlpha | ( | const B2DPoint & | rUV, |
const ODFGradientInfo & | rGradInfo | ||
) |
Calculate linear gradient blend value.
This method generates you the lerp alpha value for blending linearly between gradient start and end color, according to the formula (startCol*(1.0-alpha) + endCol*alpha)
rUV | Current uv coordinate. Values outside [0,1] will be clamped. Assumes gradient color varies along the y axis. |
rGradInfo | Gradient info, for transformation and number of steps |
Definition at line 586 of file gradienttools.cxx.
References basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2VectorOrientation basegfx::utils::getOrientation | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 130 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::fTools::equalZero(), getSignedArea(), basegfx::Negative, basegfx::Neutral, and basegfx::Positive.
Referenced by correctOrientations(), createAreaGeometry(), createNonzeroConform(), getOrientationForIndex(), hasNeutralPoints(), isConvex(), removeNeutralPoints(), setContinuityInPoint(), stripDispensablePolygons(), and stripNeutralPolygons().
BASEGFX_DLLPUBLIC B2VectorOrientation basegfx::utils::getOrientationForIndex | ( | const B2DPolygon & | rCandidate, |
sal_uInt32 | nIndex | ||
) |
Definition at line 2053 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), getIndexOfPredecessor(), getIndexOfSuccessor(), getOrientation(), and nIndex.
Referenced by removeNeutralPoints().
|
static |
Definition at line 202 of file b3dpolypolygontools.cxx.
Referenced by createUnitSphereFillPolyPolygon(), and createUnitSpherePolyPolygon().
BASEGFX_DLLPUBLIC B2DPoint basegfx::utils::getPositionAbsolute | ( | const B2DPolygon & | rCandidate, |
double | fDistance, | ||
double | fLength | ||
) |
Definition at line 520 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DCubicBezierHelper::distanceToRelative(), basegfx::fTools::equalZero(), basegfx::B2DPolygon::getB2DPoint(), getEdgeLength(), getLength(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), interpolate(), basegfx::B2DCubicBezier::interpolatePoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::fTools::less(), basegfx::fTools::moreOrEqual(), nCount, and nIndex.
Referenced by createAreaGeometryForLineStartEnd(), and getPositionRelative().
BASEGFX_DLLPUBLIC B2DPoint basegfx::utils::getPositionRelative | ( | const B2DPolygon & | rCandidate, |
double | fDistance, | ||
double | fLength | ||
) |
Definition at line 657 of file b2dpolygontools.cxx.
References basegfx::fTools::equalZero(), getLength(), and getPositionAbsolute().
Referenced by reSegmentPolygon().
BASEGFX_DLLPUBLIC double basegfx::utils::getRadialGradientAlpha | ( | const B2DPoint & | rUV, |
const ODFGradientInfo & | rGradInfo | ||
) |
Calculate radial gradient blend value.
This method generates you the lerp alpha value for blending linearly between gradient start and end color, according to the formula (startCol*(1.0-alpha) + endCol*alpha)
rUV | Current uv coordinate. Values outside [0,1] will be clamped. |
rGradInfo | Gradient info, for transformation and number of steps |
Definition at line 629 of file gradienttools.cxx.
References basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DRange basegfx::utils::getRange | ( | const B2DPolygon & | rCandidate | ) |
Get the range of a polygon.
This method creates the outer range of the subdivided bezier curve. For detailed discussion see B2DPolygon::getB2DRange()
rCandidate | The B2DPolygon possibly containing bezier segments |
Definition at line 391 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::getB2DRange().
Referenced by addPointsAtCutsAndTouches(), basegfx::unotools::UnoPolyPolygon::addPolyPolygon(), applyDefaultTextureCoordinatesSphere(), clipPolygonOnParallelAxis(), clipPolygonOnRange(), createAreaGeometryForLineStartEnd(), createNonzeroConform(), getRange(), and stripDispensablePolygons().
BASEGFX_DLLPUBLIC B2DRange basegfx::utils::getRange | ( | const B2DPolyPolygon & | rCandidate | ) |
Get the range of a polyPolygon.
For detailed description look at getRange(const B2DPolygon&). This method just expands by the range of every sub-Polygon.
rCandidate | The B2DPolyPolygon possibly containing bezier segments |
Definition at line 182 of file b2dpolypolygontools.cxx.
References basegfx::Range2D< TYPE, TRAITS >::expand(), and getRange().
BASEGFX_DLLPUBLIC B3DRange basegfx::utils::getRange | ( | const B3DPolygon & | rCandidate | ) |
Definition at line 58 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::B3DRange::expand(), and basegfx::B3DPolygon::getB3DPoint().
BASEGFX_DLLPUBLIC B3DRange basegfx::utils::getRange | ( | const B3DPolyPolygon & | rCandidate | ) |
Definition at line 37 of file b3dpolypolygontools.cxx.
References basegfx::B3DRange::expand(), and getRange().
BASEGFX_DLLPUBLIC double basegfx::utils::getRectangularGradientAlpha | ( | const B2DPoint & | rUV, |
const ODFGradientInfo & | rGradInfo | ||
) |
Calculate rectangular gradient blend value.
This method generates you the lerp alpha value for blending linearly between gradient start and end color, according to the formula (startCol*(1.0-alpha) + endCol*alpha)
rUV | Current uv coordinate. Values outside [0,1] will be clamped. |
rGradInfo | Gradient info, for transformation and number of steps |
Definition at line 690 of file gradienttools.cxx.
References basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC double basegfx::utils::getSignedArea | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 397 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::fTools::equalZero(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getDefaultAdaptiveSubdivision(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
Referenced by getArea(), getOrientation(), and getSignedArea().
BASEGFX_DLLPUBLIC double basegfx::utils::getSignedArea | ( | const B2DPolyPolygon & | rCandidate | ) |
Definition at line 194 of file b2dpolypolygontools.cxx.
References getSignedArea().
BASEGFX_DLLPUBLIC double basegfx::utils::getSmallestDistancePointToEdge | ( | const B2DPoint & | rPointA, |
const B2DPoint & | rPointB, | ||
const B2DPoint & | rTestPoint, | ||
double & | rCut | ||
) |
Definition at line 2357 of file b2dpolygontools.cxx.
References basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DVector::getLength(), basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
Referenced by getSmallestDistancePointToPolygon().
BASEGFX_DLLPUBLIC double basegfx::utils::getSmallestDistancePointToPolygon | ( | const B2DPolygon & | rCandidate, |
const B2DPoint & | rTestPoint, | ||
sal_uInt32 & | rEdgeIndex, | ||
double & | rCut | ||
) |
Definition at line 2398 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::fTools::equal(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getEndPoint(), getIndexOfSuccessor(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getSmallestDistancePointToBezierSegment(), getSmallestDistancePointToEdge(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), basegfx::B2DCubicBezier::setStartPoint(), and basegfx::B2DCubicBezier::testAndSolveTrivialBezier().
Referenced by getSmallestDistancePointToPolyPolygon().
BASEGFX_DLLPUBLIC double basegfx::utils::getSmallestDistancePointToPolyPolygon | ( | const B2DPolyPolygon & | rCandidate, |
const B2DPoint & | rTestPoint, | ||
sal_uInt32 & | rPolygonIndex, | ||
sal_uInt32 & | rEdgeIndex, | ||
double & | rCut | ||
) |
Definition at line 277 of file b2dpolypolygontools.cxx.
References a, basegfx::B2DPolyPolygon::count(), basegfx::fTools::equal(), basegfx::B2DPolyPolygon::getB2DPolygon(), and getSmallestDistancePointToPolygon().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::getSnippetAbsolute | ( | const B2DPolygon & | rCandidate, |
double | fFrom, | ||
double | fTo, | ||
double | fLength | ||
) |
Definition at line 670 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DCubicBezierHelper::distanceToRelative(), basegfx::fTools::equal(), basegfx::fTools::equalZero(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), getEdgeLength(), basegfx::B2DCubicBezier::getEndPoint(), getLength(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getStartPoint(), interpolate(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::fTools::less(), basegfx::fTools::more(), basegfx::fTools::moreOrEqual(), basegfx::B2DPolygon::setNextControlPoint(), basegfx::B2DPolygon::setPrevControlPoint(), and basegfx::B2DCubicBezier::split().
BASEGFX_DLLPUBLIC double basegfx::utils::getSquareGradientAlpha | ( | const B2DPoint & | rUV, |
const ODFGradientInfo & | rGradInfo | ||
) |
Calculate square gradient blend value.
This method generates you the lerp alpha value for blending linearly between gradient start and end color, according to the formula (startCol*(1.0-alpha) + endCol*alpha)
rUV | Current uv coordinate. Values outside [0,1] will be clamped. |
rGradInfo | Gradient info, for transformation and number of steps |
Definition at line 670 of file gradienttools.cxx.
References basegfx::Tuple2D< TYPE >::getX(), and basegfx::Tuple2D< TYPE >::getY().
BASEGFX_DLLPUBLIC B2DVector basegfx::utils::getTangentEnteringPoint | ( | const B2DPolygon & | rCandidate, |
sal_uInt32 | nIndex | ||
) |
get the tangent with which the given point is entered seen from the previous polygon path data.
Take into account all stuff like closed state, zero-length edges and others.
Definition at line 3163 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::count(), basegfx::Tuple2D< TYPE >::equalZero(), basegfx::B2DPolygon::getBezierSegment(), basegfx::B2DCubicBezier::getTangent(), basegfx::B2DPolygon::isClosed(), nCount, and nIndex.
BASEGFX_DLLPUBLIC B2DVector basegfx::utils::getTangentLeavingPoint | ( | const B2DPolygon & | rCandidate, |
sal_uInt32 | nIndex | ||
) |
get the tangent with which the given point is left seen from the following polygon path data.
Take into account all stuff like closed state, zero-length edges and others.
Definition at line 3207 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::count(), basegfx::Tuple2D< TYPE >::equalZero(), basegfx::B2DPolygon::getBezierSegment(), basegfx::B2DCubicBezier::getTangent(), basegfx::B2DPolygon::isClosed(), nCount, and nIndex.
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::growInNormalDirection | ( | const B2DPolygon & | rCandidate, |
double | fValue | ||
) |
Definition at line 2737 of file b2dpolygontools.cxx.
References a, adaptiveSubdivideByAngle(), aDirection, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::getNormalizedPerpendicular(), growInNormalDirection(), basegfx::B2DPolygon::isClosed(), and basegfx::B2DPolygon::setClosed().
Referenced by growInNormalDirection().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::growInNormalDirection | ( | const B2DPolyPolygon & | rCandidate, |
double | fValue | ||
) |
Definition at line 333 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), and growInNormalDirection().
BASEGFX_DLLPUBLIC bool basegfx::utils::hasNeutralPoints | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 1930 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), getOrientation(), and basegfx::Neutral.
Referenced by removeNeutralPoints().
BASEGFX_DLLPUBLIC BColor basegfx::utils::hsl2rgb | ( | const BColor & | rHSLColor | ) |
Transform from HSL to RGB.
Definition at line 82 of file bcolortools.cxx.
References basegfx::fTools::equalZero(), basegfx::BColor::getBlue(), basegfx::BColor::getGreen(), basegfx::BColor::getRed(), h, and hsl2rgbHelper().
|
static |
Definition at line 63 of file bcolortools.cxx.
Referenced by hsl2rgb().
BASEGFX_DLLPUBLIC BColor basegfx::utils::hsv2rgb | ( | const BColor & | rHSVColor | ) |
Transform from HSV to RGB.
Definition at line 143 of file bcolortools.cxx.
References basegfx::fTools::equal(), basegfx::fTools::equalZero(), basegfx::BColor::getBlue(), basegfx::BColor::getGreen(), basegfx::BColor::getRed(), h, p, t, and v.
|
static |
Definition at line 1722 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), createRotateB2DHomMatrix(), impDistanceBezierPointToControl(), basegfx::B2DPolygon::removeDoublePoints(), basegfx::B2DPolygon::setClosed(), and STEPSPERQUARTER.
Referenced by createPolygonFromUnitCircle().
|
static |
Definition at line 1572 of file b2dpolygontools.cxx.
References SAL_WARN_IF.
Referenced by createHalfUnitCircle(), createPolygonFromRect(), createPolygonFromUnitEllipseSegment(), and impCreateUnitCircle().
|
static |
Definition at line 1179 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::append(), basegfx::B2DPolygon::clear(), basegfx::B2DPolygon::count(), basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DPolygon::getB2DPoint(), and basegfx::B2DPolygon::removeDoublePoints().
Referenced by applyLineDashing().
|
static |
Definition at line 148 of file b3dpolygontools.cxx.
References basegfx::B3DPolygon::append(), basegfx::B3DPolygon::clear(), basegfx::B3DPolygon::count(), basegfx::B3DTuple::equal(), basegfx::B3DPolygon::getB3DPoint(), and basegfx::B3DPolygon::removeDoublePoints().
|
static |
Definition at line 1151 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::count(), and basegfx::B2DPolygon::isClosed().
Referenced by applyLineDashing().
|
static |
Definition at line 120 of file b3dpolygontools.cxx.
References basegfx::B3DPolygon::count(), and basegfx::B3DPolygon::isClosed().
BASEGFX_DLLPUBLIC bool basegfx::utils::importFromSvgD | ( | B2DPolyPolygon & | o_rPolyPoly, |
std::u16string_view | rSvgDAttribute, | ||
bool | bHandleRelativeNextPointCompatible, | ||
PointIndexSet * | pHelpPointIndexSet | ||
) |
Read poly-polygon from SVG.
This function imports a poly-polygon from an SVG-D attribute.
o_rPolyPoly | The output poly-polygon |
rSvgDAttribute | A valid SVG-D attribute string |
bHandleRelativeNextPointCompatible | If set to true, the old error that after a relative 'z' command the current point was not reset to the first point of the current polygon is kept; this is needed to read odf files. If false, pure svg is used; this is needed for svg import. |
pHelpPointIndexSet | If given, all points created in the target PolyPolygon which are only helper points are added here using their point indices; this are currently points created from import of the 'a' and 'A' svg:d statements which create bezier curve info as representation and maybe points which are no 'real' svg:d points, but helper points. It is necessary to identify these e.g. when markers need to be created in the svg import |
Definition at line 75 of file b2dsvgpolypolygon.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), basegfx::B2DPolygon::appendQuadraticBezierSegment(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::clear(), basegfx::B2DPolyPolygon::clear(), basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), createPolygonFromUnitEllipseSegment(), createRotateB2DHomMatrix(), createScaleB2DHomMatrix(), basegfx::deg2rad(), basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DPolygon::flip(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::internal::importDoubleAndSpaces(), basegfx::internal::importFlagAndSpaces(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), basegfx::internal::isOnNumberChar(), basegfx::B2DPolygon::isPrevControlPointUsed(), nIndex, nPos, basegfx::B2DHomMatrix::rotate(), SAL_WARN, basegfx::B2DPolygon::setClosed(), basegfx::Tuple2D< TYPE >::setX(), basegfx::Tuple2D< TYPE >::setY(), basegfx::internal::skipSpaces(), basegfx::B2DPolygon::transform(), and basegfx::B2DHomMatrix::translate().
BASEGFX_DLLPUBLIC bool basegfx::utils::importFromSvgPoints | ( | B2DPolygon & | o_rPoly, |
std::u16string_view | rSvgPointsAttribute | ||
) |
Read poly-polygon from SVG.
This function imports a poly-polygon from an SVG points attribute (a plain list of coordinate pairs).
o_rPoly | The output polygon. Note that svg:points can only define a single polygon |
rSvgPointsAttribute | A valid SVG points attribute string |
Definition at line 666 of file b2dsvgpolypolygon.cxx.
References basegfx::B2DPolygon::append(), basegfx::B2DPolygon::clear(), basegfx::internal::importDoubleAndSpaces(), nPos, and basegfx::internal::skipSpaces().
BASEGFX_DLLPUBLIC void basegfx::utils::infiniteLineFromParallelogram | ( | ::basegfx::B2DPoint & | io_rLeftTop, |
::basegfx::B2DPoint & | io_rLeftBottom, | ||
::basegfx::B2DPoint & | io_rRightTop, | ||
::basegfx::B2DPoint & | io_rRightBottom, | ||
const ::basegfx::B2DRange & | rFitTarget | ||
) |
Expand given parallelogram, such that it extends beyond bound rect in a given direction.
This method is useful when e.g. generating one-dimensional gradients, such as linear or axial gradients: those gradients vary only in one direction, the other has constant color. Most of the time, those gradients extends infinitely in the direction with the constant color, but practically, one always has a limiting bound rect into which the gradient is painted. The method at hand now extends a given parallelogram (e.g. the transformed bounding box of a gradient) virtually into infinity to the top and to the bottom (i.e. normal to the line io_rLeftTop io_rRightTop), such that the given rectangle is guaranteed to be covered in that direction.
io_rLeftTop | Left, top edge of the parallelogramm. Note that this need not be the left, top edge geometrically, it's just used when determining the extension direction. Thus, it's perfectly legal to affine-transform a rectangle, and given the transformed point here. On method return, this parameter will contain the adapted output. |
io_rLeftBottom | Left, bottom edge of the parallelogramm. Note that this need not be the left, bottom edge geometrically, it's just used when determining the extension direction. Thus, it's perfectly legal to affine-transform a rectangle, and given the transformed point here. On method return, this parameter will contain the adapted output. |
io_rRightTop | Right, top edge of the parallelogramm. Note that this need not be the right, top edge geometrically, it's just used when determining the extension direction. Thus, it's perfectly legal to affine-transform a rectangle, and given the transformed point here. On method return, this parameter will contain the adapted output. |
io_rRightBottom | Right, bottom edge of the parallelogramm. Note that this need not be the right, bottom edge geometrically, it's just used when determining the extension direction. Thus, it's perfectly legal to affine-transform a rectangle, and given the transformed point here. On method return, this parameter will contain the adapted output. |
rFitTarget | The rectangle to fit the parallelogram into. |
Definition at line 77 of file tools.cxx.
References basegfx::B2DVector::normalize().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::interpolate | ( | const B2DPolygon & | rOld1, |
const B2DPolygon & | rOld2, | ||
double | t | ||
) |
Definition at line 2821 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), interpolate(), basegfx::B2DPolygon::isClosed(), basegfx::fTools::lessOrEqual(), basegfx::fTools::moreOrEqual(), basegfx::B2DPolygon::setClosed(), basegfx::B2DPolygon::setNextControlPoint(), basegfx::B2DPolygon::setPrevControlPoint(), and t.
Referenced by applyLineDashing(), createPolygonFromRect(), expandToCurveInPoint(), getPositionAbsolute(), getSnippetAbsolute(), interpolate(), isInEpsilonRange(), and setContinuityInPoint().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::interpolate | ( | const B2DPolyPolygon & | rOld1, |
const B2DPolyPolygon & | rOld2, | ||
double | t | ||
) |
Definition at line 364 of file b2dpolypolygontools.cxx.
References a, basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::getB2DPolygon(), interpolate(), and t.
BASEGFX_DLLPUBLIC B3DPolygon basegfx::utils::invertNormals | ( | const B3DPolygon & | rCandidate | ) |
invert normals for given 3d geometry.
Definition at line 321 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::areNormalsUsed(), basegfx::B3DPolygon::count(), basegfx::B3DPolygon::getNormal(), and basegfx::B3DPolygon::setNormal().
Referenced by invertNormals().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::invertNormals | ( | const B3DPolyPolygon & | rCandidate | ) |
invert normals for given 3d geometry.
Definition at line 398 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::append(), and invertNormals().
BASEGFX_DLLPUBLIC bool basegfx::utils::isConvex | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 2012 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), getOrientation(), and basegfx::Neutral.
Referenced by basegfx::triangulator::triangulate().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInEpsilonRange | ( | const B2DPoint & | rEdgeStart, |
const B2DPoint & | rEdgeEnd, | ||
const B2DPoint & | rTestPosition, | ||
double | fDistance | ||
) |
Definition at line 1455 of file b2dpolygontools.cxx.
References basegfx::Tuple2D< TYPE >::equalZero(), basegfx::getPerpendicular(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), interpolate(), basegfx::fTools::less(), basegfx::fTools::more(), and basegfx::B2DVector::scalar().
Referenced by isInEpsilonRange().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInEpsilonRange | ( | const B2DPolygon & | rCandidate, |
const B2DPoint & | rTestPosition, | ||
double | fDistance | ||
) |
Definition at line 1526 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getDefaultAdaptiveSubdivision(), basegfx::B2DPolygon::isClosed(), and isInEpsilonRange().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInEpsilonRange | ( | const B2DPolyPolygon & | rCandidate, |
const B2DPoint & | rTestPosition, | ||
double | fDistance | ||
) |
Definition at line 240 of file b2dpolypolygontools.cxx.
References isInEpsilonRange().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInside | ( | const B2DPolygon & | rCandidate, |
const B2DPoint & | rPoint, | ||
bool | bWithBorder | ||
) |
Definition at line 312 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getDefaultAdaptiveSubdivision(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), and isPointOnPolygon().
Referenced by clipPolyPolygonOnPolyPolygon(), correctOrientations(), correctOutmostPolygon(), createNonzeroConform(), isInside(), and stripDispensablePolygons().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInside | ( | const B2DPolygon & | rCandidate, |
const B2DPolygon & | rPolygon, | ||
bool | bWithBorder | ||
) |
Definition at line 372 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getDefaultAdaptiveSubdivision(), and isInside().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInside | ( | const B2DPolyPolygon & | rCandidate, |
const B2DPoint & | rPoint, | ||
bool | bWithBorder | ||
) |
Definition at line 168 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::begin(), basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::end(), basegfx::B2DPolyPolygon::getB2DPolygon(), and isInside().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInside | ( | const B3DPolygon & | rCandidate, |
const B3DPoint & | rPoint, | ||
bool | bWithBorder | ||
) |
Definition at line 507 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::B3DTuple::equalZero(), basegfx::B3DPolygon::getB3DPoint(), basegfx::B3DPolygon::getNormal(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), isPointOnPolygon(), and basegfx::fTools::more().
BASEGFX_DLLPUBLIC bool basegfx::utils::isInside | ( | const B3DPolyPolygon & | rCandidate, |
const B3DPoint & | rPoint | ||
) |
Definition at line 434 of file b3dpolypolygontools.cxx.
References basegfx::B3DPolyPolygon::count(), basegfx::B3DPolyPolygon::getB3DPolygon(), and isInside().
BASEGFX_DLLPUBLIC bool basegfx::utils::isPointInTriangle | ( | const B2DPoint & | rA, |
const B2DPoint & | rB, | ||
const B2DPoint & | rC, | ||
const B2DPoint & | rCandidate, | ||
bool | bWithBorder | ||
) |
Definition at line 2130 of file b2dpolygontools.cxx.
References arePointsOnSameSideOfLine().
BASEGFX_DLLPUBLIC bool basegfx::utils::isPointOnEdge | ( | const B2DPoint & | rPoint, |
const B2DPoint & | rEdgeStart, | ||
const B2DVector & | rEdgeDelta, | ||
double * | pCut | ||
) |
Definition at line 1034 of file b2dpolygontools.cxx.
References basegfx::fTools::equal(), basegfx::fTools::equalZero(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::fTools::less(), and basegfx::fTools::more().
Referenced by findCut().
BASEGFX_DLLPUBLIC bool basegfx::utils::isPointOnLine | ( | const B2DPoint & | rStart, |
const B2DPoint & | rEnd, | ||
const B2DPoint & | rCandidate, | ||
bool | bWithPoints | ||
) |
Definition at line 2065 of file b2dpolygontools.cxx.
References basegfx::areParallel(), basegfx::Tuple2D< TYPE >::equal(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), basegfx::fTools::less(), and basegfx::fTools::more().
Referenced by isPointOnPolygon().
BASEGFX_DLLPUBLIC bool basegfx::utils::isPointOnLine | ( | const B3DPoint & | rStart, |
const B3DPoint & | rEnd, | ||
const B3DPoint & | rCandidate, | ||
bool | bWithPoints | ||
) |
Definition at line 659 of file b3dpolygontools.cxx.
References basegfx::areParallel(), basegfx::B3DTuple::equal(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), basegfx::fTools::less(), and basegfx::fTools::more().
BASEGFX_DLLPUBLIC bool basegfx::utils::isPointOnPolygon | ( | const B2DPolygon & | rCandidate, |
const B2DPoint & | rPoint, | ||
bool | bWithPoints | ||
) |
Definition at line 2100 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getDefaultAdaptiveSubdivision(), basegfx::B2DPolygon::isClosed(), and isPointOnLine().
Referenced by isInside().
BASEGFX_DLLPUBLIC bool basegfx::utils::isPointOnPolygon | ( | const B3DPolygon & | rCandidate, |
const B3DPoint & | rPoint | ||
) |
Definition at line 717 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::B3DTuple::equal(), basegfx::B3DPolygon::getB3DPoint(), basegfx::B3DPolygon::isClosed(), and isPointOnLine().
BASEGFX_DLLPUBLIC bool basegfx::utils::isRectangle | ( | const B2DPolygon & | rPoly | ) |
Predicate whether a given polygon is a rectangle.
rPoly | Polygon to check |
Definition at line 2208 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), i, basegfx::B2DPolygon::isClosed(), and nCount.
Referenced by clipPolyPolygonOnPolyPolygon(), isRectangle(), and solvePolygonOperationAnd().
BASEGFX_DLLPUBLIC bool basegfx::utils::isRectangle | ( | const B2DPolyPolygon & | rPoly | ) |
Predicate whether a given poly-polygon is a rectangle.
rPoly | tools::PolyPolygon to check |
Definition at line 377 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::getB2DPolygon(), and isRectangle().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::makeStartPoint | ( | const B2DPolygon & | rCandidate, |
sal_uInt32 | nIndexOfNewStatPoint | ||
) |
Definition at line 2915 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::setNextControlPoint(), and basegfx::B2DPolygon::setPrevControlPoint().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::mergeToSinglePolyPolygon | ( | const B2DPolyPolygonVector & | rInput | ) |
merge all single PolyPolygons to a single, OR-ed PolyPolygon
rInput | The source PolyPolygons |
Definition at line 1057 of file b2dpolypolygoncutter.cxx.
References a, basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::getB2DRange(), basegfx::Range2D< TYPE, TRAITS >::overlaps(), prepareForPolygonOperation(), basegfx::B2DPolyPolygon::reserve(), and solvePolygonOperationOr().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::number2PolyPolygon | ( | double | fVal, |
sal_Int32 | nTotalDigits, | ||
sal_Int32 | nDecPlaces, | ||
bool | bLitSegments = true |
||
) |
Creates polypolygon with the given number as seven-segment digits.
fVal | Value to convert |
nTotalDigits | Total number of digits to display. If less is needed for given number, fill space with blanks. |
nDecPlaces | Decimal places to show. When 0, display as integer. When negative, fill given number of before-the-decimal point with zero. |
bLitSegments | When true, return a polygon containing the segments that are 'lit' for the given number. Return un-lit segments otherwise. |
Definition at line 20 of file numbertools.cxx.
References basegfx::B2DPolyPolygon::append(), createSevenSegmentPolyPolygon(), i, basegfx::B2DHomMatrix::identity(), basegfx::B2DPolyPolygon::transform(), and basegfx::B2DHomMatrix::translate().
BASEGFX_DLLPUBLIC void basegfx::utils::openWithGeometryChange | ( | B2DPolygon & | rCandidate | ) |
Definition at line 44 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::append(), basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::isPrevControlPointUsed(), basegfx::B2DPolygon::resetPrevControlPoint(), basegfx::B2DPolygon::setClosed(), and basegfx::B2DPolygon::setPrevControlPoint().
BASEGFX_DLLPUBLIC void basegfx::utils::prepareColorStops | ( | const basegfx::BGradient & | rGradient, |
BColorStops & | rColorStops, | ||
BColor & | rSingleColor | ||
) |
Definition at line 271 of file gradienttools.cxx.
References basegfx::BGradient::GetBorder(), basegfx::BGradient::GetColorStops(), basegfx::BGradient::GetEndIntens(), basegfx::BGradient::GetStartIntens(), basegfx::BColorStops::isSingleColor(), basegfx::BGradient::tryToApplyBorder(), and basegfx::BGradient::tryToApplyStartEndIntensity().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::prepareForPolygonOperation | ( | const B2DPolygon & | rCandidate | ) |
prep for ops - solve self-intersections and intersections, remove neutral parts and check orientations.
Definition at line 904 of file b2dpolypolygoncutter.cxx.
References correctOrientations(), and stripNeutralPolygons().
Referenced by basegfx::utils::ImplB2DClipState::commitPendingPolygons(), and mergeToSinglePolyPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::prepareForPolygonOperation | ( | const B2DPolyPolygon & | rCandidate | ) |
prep for ops - solve self-intersections and intersections, remove neutral parts and check orientations.
Definition at line 912 of file b2dpolypolygoncutter.cxx.
References correctOrientations(), and stripNeutralPolygons().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::removeNeutralPoints | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 1964 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), getOrientation(), getOrientationForIndex(), hasNeutralPoints(), basegfx::B2DPolygon::isClosed(), basegfx::Neutral, basegfx::B2DPolygon::remove(), and basegfx::B2DPolygon::setClosed().
Referenced by basegfx::triangulator::triangulate().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::reSegmentPolygon | ( | const B2DPolygon & | rCandidate, |
sal_uInt32 | nSegments | ||
) |
Definition at line 2787 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::count(), getLength(), getPositionRelative(), basegfx::B2DPolygon::isClosed(), and basegfx::B2DPolygon::setClosed().
Referenced by reSegmentPolyPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::reSegmentPolyPolygon | ( | const B2DPolyPolygon & | rCandidate, |
sal_uInt32 | nSegments | ||
) |
Definition at line 352 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), and reSegmentPolygon().
BASEGFX_DLLPUBLIC BColor basegfx::utils::rgb2hsl | ( | const BColor & | rRGBColor | ) |
Transform from RGB to HSL.
Definition at line 27 of file bcolortools.cxx.
References d, basegfx::fTools::equalZero(), basegfx::BColor::getBlue(), basegfx::BColor::getGreen(), basegfx::BColor::getRed(), and h.
BASEGFX_DLLPUBLIC BColor basegfx::utils::rgb2hsv | ( | const BColor & | rRGBColor | ) |
Transform from RGB to HSV.
Definition at line 104 of file bcolortools.cxx.
References basegfx::fTools::equalZero(), basegfx::BColor::getBlue(), basegfx::BColor::getGreen(), basegfx::BColor::getRed(), h, and v.
|
static |
Definition at line 560 of file b2dpolygonclipper.cxx.
References getCohenSutherlandClipFlags(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), i, and t.
Referenced by clipTriangleListOnRange().
BASEGFX_DLLPUBLIC bool basegfx::utils::setContinuityInPoint | ( | B2DPolygon & | rCandidate, |
sal_uInt32 | nIndex, | ||
B2VectorContinuity | eContinuity | ||
) |
Definition at line 2585 of file b2dpolygontools.cxx.
References basegfx::C1, basegfx::C2, basegfx::B2DPolygon::count(), basegfx::fTools::equal(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DVector::getLength(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::getNormalizedPerpendicular(), getOrientation(), basegfx::B2DPolygon::getPrevControlPoint(), interpolate(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::isNextControlPointUsed(), basegfx::B2DPolygon::isPrevControlPointUsed(), basegfx::Neutral, nIndex, basegfx::NONE, basegfx::B2DVector::normalize(), basegfx::Positive, basegfx::B2DPolygon::resetNextControlPoint(), basegfx::B2DPolygon::resetPrevControlPoint(), basegfx::B2DVector::scalar(), basegfx::B2DPolygon::setControlPoints(), basegfx::B2DPolygon::setNextControlPoint(), and basegfx::B2DPolygon::setPrevControlPoint().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::simplifyCurveSegments | ( | const B2DPolygon & | rCandidate | ) |
Definition at line 2855 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), basegfx::B2DPolygon::areControlPointsUsed(), closeWithGeometryChange(), basegfx::B2DPolygon::count(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DCubicBezier::getControlPointA(), basegfx::B2DCubicBezier::getControlPointB(), basegfx::B2DCubicBezier::getEndPoint(), basegfx::B2DPolygon::getNextControlPoint(), basegfx::B2DPolygon::getPrevControlPoint(), basegfx::B2DCubicBezier::getStartPoint(), basegfx::B2DCubicBezier::isBezier(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::reserve(), basegfx::B2DCubicBezier::setControlPointA(), basegfx::B2DCubicBezier::setControlPointB(), basegfx::B2DCubicBezier::setEndPoint(), basegfx::B2DCubicBezier::setStartPoint(), and basegfx::B2DCubicBezier::testAndSolveTrivialBezier().
Referenced by simplifyCurveSegments().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::simplifyCurveSegments | ( | const B2DPolyPolygon & | rCandidate | ) |
Definition at line 387 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::areControlPointsUsed(), and simplifyCurveSegments().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::snapPointsOfHorizontalOrVerticalEdges | ( | const B2DPolygon & | rCandidate | ) |
snap some polygon coordinates to discrete coordinates
This method allows to snap some polygon points to discrete (integer) values which equals e.g. a snap to discrete coordinates. It will snap points of horizontal and vertical edges
rCandidate | The source polygon |
Definition at line 3104 of file b2dpolygontools.cxx.
References a, basegfx::B2DPolygon::count(), basegfx::fround(), basegfx::B2DPolygon::getB2DPoint(), basegfx::Tuple2D< TYPE >::getX(), basegfx::Tuple2D< TYPE >::getY(), and basegfx::B2DPolygon::setB2DPoint().
Referenced by snapPointsOfHorizontalOrVerticalEdges().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::snapPointsOfHorizontalOrVerticalEdges | ( | const B2DPolyPolygon & | rCandidate | ) |
snap some polygon coordinates to discrete coordinates
This method allows to snap some polygon points to discrete (integer) values which equals e.g. a snap to discrete coordinates. It will snap points of horizontal and vertical edges
rCandidate | The source polygon |
Definition at line 406 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), and snapPointsOfHorizontalOrVerticalEdges().
BASEGFX_DLLPUBLIC B3DPolygon basegfx::utils::snapPointsOfHorizontalOrVerticalEdges | ( | const B3DPolygon & | rCandidate | ) |
snap some polygon coordinates to discrete coordinates
This method allows to snap some polygon points to discrete (integer) values which equals e.g. a snap to discrete coordinates. It will snap points of horizontal and vertical edges
rCandidate | The source polygon |
Definition at line 767 of file b3dpolygontools.cxx.
References a, basegfx::B3DPolygon::count(), basegfx::fround(), basegfx::B3DPolygon::getB3DPoint(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), and basegfx::B3DPolygon::setB3DPoint().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::solveCrossovers | ( | const B2DPolygon & | rCandidate | ) |
Solve all crossovers (aka self-intersections) in a Polygon.
Same as above, but for single polygons. Result will be free of self-intersections. When result contains multiple polygons, it may be necessary to rearrange their orientations since holes may have been created (possibly use correctOrientations).
Definition at line 689 of file b2dpolypolygoncutter.cxx.
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::solveCrossovers | ( | const B2DPolyPolygon & | rCandidate, |
size_t * | pPointLimit = nullptr |
||
) |
Solve all crossovers (aka self-intersections) in a polyPolygon.
This re-layouts all contained polygons so that the result will contain only non-cutting polygons. For that reason, points will be added at crossover and touch points and the single Polygons may be re-combined. The orientations of the contained polygons in not changed but used as topological information. Self crossovers of the contained sub-polygons are implicitly handled, but to not lose the topological information, it may be necessary to remove self-intersections of the contained sub-polygons in a preparing step and to explicitly correct their orientations.
Definition at line 676 of file b2dpolypolygoncutter.cxx.
References basegfx::B2DPolyPolygon::count().
Referenced by clipPolyPolygonOnPolyPolygon(), basegfx::utils::ImplB2DClipState::commitPendingPolygons(), createNonzeroConform(), basegfx::ImplB2DPolyRange::solveCrossovers(), solvePolygonOperationAnd(), solvePolygonOperationDiff(), solvePolygonOperationOr(), and solvePolygonOperationXor().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::solveCrossovers | ( | const std::vector< B2DRange > & | rRanges, |
const std::vector< B2VectorOrientation > & | rOrientations | ||
) |
Extract poly-polygon w/o self-intersections from poly-range.
Similar to the solveCrossovers(const B2DPolyPolygon&) method, this one calculates a self-intersection-free poly-polygon with the same topology, and encoding inside/outsidedness via polygon orientation and layering.
Definition at line 836 of file b2drangeclipper.cxx.
References basegfx::B2DPolyPolygon::reserve().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::solvePolygonOperationAnd | ( | const B2DPolyPolygon & | rCandidateA, |
const B2DPolyPolygon & | rCandidateB | ||
) |
AND: Return all areas where CandidateA and CandidateB exist.
Definition at line 969 of file b2dpolypolygoncutter.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::count(), createPolygonFromRect(), basegfx::B2DPolyPolygon::getB2DRange(), basegfx::Range2D< TYPE, TRAITS >::intersect(), basegfx::Range2D< TYPE, TRAITS >::isEmpty(), basegfx::Range2D< TYPE, TRAITS >::isInside(), isRectangle(), solveCrossovers(), stripDispensablePolygons(), and stripNeutralPolygons().
Referenced by basegfx::utils::ImplB2DClipState::commitPendingPolygons(), and basegfx::utils::ImplB2DClipState::commitPendingRanges().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::solvePolygonOperationDiff | ( | const B2DPolyPolygon & | rCandidateA, |
const B2DPolyPolygon & | rCandidateB | ||
) |
DIFF: Return all areas where CandidateA is not covered by CandidateB (cut B out of A)
Definition at line 1030 of file b2dpolypolygoncutter.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::flip(), solveCrossovers(), stripDispensablePolygons(), and stripNeutralPolygons().
Referenced by basegfx::utils::ImplB2DClipState::commitPendingPolygons(), and basegfx::utils::ImplB2DClipState::commitPendingRanges().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::solvePolygonOperationOr | ( | const B2DPolyPolygon & | rCandidateA, |
const B2DPolyPolygon & | rCandidateB | ||
) |
OR: Return all areas where CandidateA or CandidateB exist.
Definition at line 920 of file b2dpolypolygoncutter.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::count(), solveCrossovers(), stripDispensablePolygons(), and stripNeutralPolygons().
Referenced by basegfx::utils::ImplB2DClipState::commitPendingPolygons(), basegfx::utils::ImplB2DClipState::commitPendingRanges(), and mergeToSinglePolyPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::solvePolygonOperationXor | ( | const B2DPolyPolygon & | rCandidateA, |
const B2DPolyPolygon & | rCandidateB | ||
) |
XOR: Return all areas where CandidateA or CandidateB exist, but not both.
Definition at line 944 of file b2dpolypolygoncutter.cxx.
References basegfx::B2DPolyPolygon::append(), correctOrientations(), basegfx::B2DPolyPolygon::count(), solveCrossovers(), and stripNeutralPolygons().
Referenced by basegfx::utils::ImplB2DClipState::commitPendingPolygons(), and basegfx::utils::ImplB2DClipState::commitPendingRanges().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::stripDispensablePolygons | ( | const B2DPolyPolygon & | rCandidate, |
bool | bKeepAboveZero = false |
||
) |
Remove unnecessary/non-displayed polygons.
Works only correct with self-intersection-free polygons. For each polygon, the depth for the PolyPolygon is calculated. The orientation is used to identify holes. Start value for holes is -1, for polygons it's zero. Ech time a polygon is contained in another one, it's depth is increased when inside a polygon, decreased when inside a hole. The result is a depth which e.g. is -1 for holes outside everything, 1 for a polygon covered by another polygon and zero for e.g. holes in a polygon or polygons outside everything else. In the 2nd step, all polygons with depth other than zero are removed. If bKeepAboveZero is used, all polygons < 1 are removed. The bKeepAboveZero mode is useful for clipping, e.g. just append one polygon to another and use this mode -> only parts where two polygons overlapped will be kept. In combination with correct orientation of the input orientations and the SolveCrossover calls this can be combined for logical polygon operations or polygon clipping.
Definition at line 802 of file b2dpolypolygoncutter.cxx.
References a, basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::getB2DPolygon(), getOrientation(), getRange(), isInside(), nCount, basegfx::Negative, and basegfx::Positive.
Referenced by clipPolyPolygonOnPolyPolygon(), basegfx::utils::ImplB2DClipState::commitPendingPolygons(), basegfx::utils::ImplB2DClipState::commitPendingRanges(), solvePolygonOperationAnd(), solvePolygonOperationDiff(), and solvePolygonOperationOr().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::stripNeutralPolygons | ( | const B2DPolyPolygon & | rCandidate | ) |
Strip neutral polygons from PolyPolygon.
Neutral polygons are ones who's orientation is neutral, so normally they have no volume -> just closed paths. A polygon with the same positive and negative oriented volume is also neutral, so this may not be wanted. It is safe to call with self-intersection-free polygons, though (that's where it's mostly used).
Definition at line 695 of file b2dpolypolygoncutter.cxx.
References basegfx::B2DPolyPolygon::append(), getOrientation(), and basegfx::Neutral.
Referenced by clipPolyPolygonOnPolyPolygon(), basegfx::utils::ImplB2DClipState::commitPendingPolygons(), basegfx::utils::ImplB2DClipState::commitPendingRanges(), createNonzeroConform(), prepareForPolygonOperation(), solvePolygonOperationAnd(), solvePolygonOperationDiff(), solvePolygonOperationOr(), and solvePolygonOperationXor().
BASEGFX_DLLPUBLIC void basegfx::utils::synchronizeColorStops | ( | BColorStops & | rColorStops, |
BColorStops & | rAlphaStops, | ||
const BColor & | rSingleColor, | ||
const BColor & | rSingleAlpha | ||
) |
Definition at line 323 of file gradienttools.cxx.
References basegfx::fTools::equal(), basegfx::BColorStops::getInterpolatedBColor(), basegfx::fTools::less(), and basegfx::fTools::more().
BASEGFX_DLLPUBLIC void basegfx::utils::trapezoidSubdivide | ( | B2DTrapezoidVector & | ro_Result, |
const B2DPolyPolygon & | rSourcePolyPolygon | ||
) |
Definition at line 939 of file b2dtrapezoid.cxx.
BASEGFX_DLLPUBLIC B3DHomMatrix basegfx::utils::UnoHomogenMatrixToB3DHomMatrix | ( | const com::sun::star::drawing::HomogenMatrix & | rMatrixIn | ) |
Definition at line 25 of file b3dhommatrixtools.cxx.
References basegfx::B3DHomMatrix::set().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::UnoPointSequenceSequenceToB2DPolyPolygon | ( | const css::drawing::PointSequenceSequence & | rPointSequenceSequenceSource | ) |
converters for css::drawing::PointSequence
Definition at line 552 of file b2dpolypolygontools.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::reserve(), and UnoPointSequenceToB2DPolygon().
BASEGFX_DLLPUBLIC B2DPolygon basegfx::utils::UnoPointSequenceToB2DPolygon | ( | const css::drawing::PointSequence & | rPointSequenceSource | ) |
converters for css::drawing::PointSequence
Definition at line 3247 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::append(), checkClosed(), nLength, and basegfx::B2DPolygon::reserve().
Referenced by UnoPointSequenceSequenceToB2DPolyPolygon().
B2DPolygon basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon | ( | const css::drawing::PointSequence & | rPointSequenceSource, |
const css::drawing::FlagSequence & | rFlagSequenceSource | ||
) |
Definition at line 3319 of file b2dpolygontools.cxx.
References basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), checkClosed(), basegfx::B2DPolygon::count(), basegfx::Tuple2D< TYPE >::equal(), basegfx::B2DPolygon::getB2DPoint(), nCount, basegfx::B2DPolygon::reserve(), and SAL_WARN_IF.
Referenced by UnoPolyPolygonBezierCoordsToB2DPolyPolygon().
BASEGFX_DLLPUBLIC B2DPolyPolygon basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon | ( | const css::drawing::PolyPolygonBezierCoords & | rPolyPolygonBezierCoordsSource | ) |
converters for css::drawing::PolyPolygonBezierCoords (curved polygons)
Definition at line 594 of file b2dpolypolygontools.cxx.
References a, basegfx::B2DPolyPolygon::append(), and UnoPolygonBezierCoordsToB2DPolygon().
BASEGFX_DLLPUBLIC B3DPolyPolygon basegfx::utils::UnoPolyPolygonShape3DToB3DPolyPolygon | ( | const css::drawing::PolyPolygonShape3D & | rPolyPolygonShape3DSource | ) |
converters for css::drawing::PolyPolygonShape3D
Definition at line 461 of file b3dpolypolygontools.cxx.
References a, basegfx::B3DPolygon::append(), basegfx::B3DPolyPolygon::append(), and checkClosed().