25 #ifndef JUCE_PATH_H_INCLUDED 26 #define JUCE_PATH_H_INCLUDED 78 #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS 112 bool contains (
float x,
float y,
113 float tolerance = 1.0f)
const;
129 float tolerance = 1.0f)
const;
142 float tolerance = 1.0f);
168 Point<float> getPointAlongPath (
float distanceFromStart,
194 void startNewSubPath (
float startX,
float startY);
232 void lineTo (
float endX,
float endY);
254 void quadraticTo (
float controlPointX,
280 void cubicTo (
float controlPoint1X,
281 float controlPoint1Y,
282 float controlPoint2X,
283 float controlPoint2Y,
309 void addRectangle (
float x,
float y,
float width,
float height);
315 template <
typename ValueType>
318 addRectangle (static_cast <float> (rectangle.
getX()), static_cast <float> (rectangle.
getY()),
319 static_cast <float> (rectangle.
getWidth()), static_cast <float> (rectangle.
getHeight()));
326 void addRoundedRectangle (
float x,
float y,
float width,
float height,
333 void addRoundedRectangle (
float x,
float y,
float width,
float height,
341 void addRoundedRectangle (
float x,
float y,
float width,
float height,
342 float cornerSizeX,
float cornerSizeY,
343 bool curveTopLeft,
bool curveTopRight,
344 bool curveBottomLeft,
bool curveBottomRight);
350 template <
typename ValueType>
353 addRoundedRectangle (static_cast <float> (rectangle.
getX()), static_cast <float> (rectangle.
getY()),
354 static_cast <float> (rectangle.
getWidth()), static_cast <float> (rectangle.
getHeight()),
355 cornerSizeX, cornerSizeY);
362 template <
typename ValueType>
365 addRoundedRectangle (rectangle, cornerSize, cornerSize);
376 void addTriangle (
float x1,
float y1,
400 void addQuadrilateral (
float x1,
float y1,
409 void addEllipse (
float x,
float y,
float width,
float height);
438 void addArc (
float x,
float y,
float width,
float height,
441 bool startAsNewSubPath =
false);
465 void addCentredArc (
float centreX,
float centreY,
466 float radiusX,
float radiusY,
467 float rotationOfEllipse,
470 bool startAsNewSubPath =
false);
494 void addPieSegment (
float x,
float y,
495 float width,
float height,
498 float innerCircleProportionalSize);
521 float innerCircleProportionalSize);
530 void addLineSegment (
const Line<float>& line,
float lineThickness);
538 float arrowheadWidth,
539 float arrowheadLength);
547 float startAngle = 0.0f);
556 float startAngle = 0.0f);
571 const float cornerSize,
572 const float arrowBaseWidth);
581 void addPath (
const Path& pathToAppend);
591 void addPath (
const Path& pathToAppend,
611 void preallocateSpace (
int numExtraCoordsToMakeSpaceFor);
635 void scaleToFit (
float x,
float y,
float width,
float height,
655 AffineTransform getTransformToScaleToFit (
float x,
float y,
float width,
float height,
656 bool preserveProportions,
674 bool preserveProportions,
682 Path createPathWithRoundedCorners (
float cornerRadius)
const;
700 void setUsingNonZeroWinding (
bool isNonZeroWinding)
noexcept;
744 float x1, y1, x2, y2, x3,
y3;
774 void loadPathFromData (
const void* data,
size_t numberOfBytes);
782 void writePathToStream (
OutputStream& destination)
const;
793 void restoreFromString (
StringRef stringVersion);
804 PathBounds() noexcept;
805 Rectangle<
float> getRectangle() const noexcept;
806 void reset() noexcept;
807 void reset (
float,
float) noexcept;
808 void extend (
float,
float) noexcept;
809 void extend (
float,
float,
float,
float) noexcept;
811 float pathXMin, pathXMax, pathYMin, pathYMax;
815 bool useNonZeroWinding;
817 static const
float lineMarker;
818 static const
float moveMarker;
819 static const
float quadMarker;
820 static const
float cubicMarker;
821 static const
float closeSubPathMarker;
826 #endif // JUCE_PATH_H_INCLUDED Definition: juce_Path.h:738
Definition: juce_PathIterator.h:39
void addRectangle(const Rectangle< ValueType > &rectangle)
Definition: juce_Path.h:316
ValueType getWidth() const noexcept
Definition: juce_Rectangle.h:113
Definition: juce_Line.h:44
#define noexcept
Definition: juce_CompilerSupport.h:141
ValueType getX() const noexcept
Definition: juce_Rectangle.h:107
ValueType getHeight() const noexcept
Definition: juce_Rectangle.h:116
Definition: juce_Path.h:736
Definition: juce_Path.h:735
PathElementType elementType
Definition: juce_Path.h:742
Definition: juce_Justification.h:38
Definition: juce_Point.h:39
Definition: juce_String.h:43
PathElementType
Definition: juce_Path.h:733
#define JUCE_API
Definition: juce_StandardHeader.h:139
void addRoundedRectangle(const Rectangle< ValueType > &rectangle, float cornerSize)
Definition: juce_Path.h:363
float y3
Definition: juce_Path.h:744
Definition: juce_Rectangle.h:36
Definition: juce_Path.h:62
bool isUsingNonZeroWinding() const
Definition: juce_Path.h:708
Definition: juce_OutputStream.h:42
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
ValueType getY() const noexcept
Definition: juce_Rectangle.h:110
Definition: juce_Justification.h:140
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition: juce_LeakedObjectDetector.h:141
bool operator!=(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:566
void addRoundedRectangle(const Rectangle< ValueType > &rectangle, float cornerSizeX, float cornerSizeY)
Definition: juce_Path.h:351
Definition: juce_Path.h:737
Definition: juce_Path.h:716
Definition: juce_StringRef.h:65