The Path2d class represents a contour composed of segments of lines and quadratic and cubic Beziér curves.

Enums


Public Member Functions

  • Path2d ()
  • Path2d (const BSpline2f &spline, float subdivisionStep=0.01f)
  • lineTo (const vec2 &p)
  • lineTo (float x, float y)
  • quadTo (const vec2 &p1, const vec2 &p2)
  • quadTo (float x1, float y1, float x2, float y2)
  • curveTo (const vec2 &p1, const vec2 &p2, const vec2 &p3)
  • curveTo (float x1, float y1, float x2, float y2, float x3, float y3)
  • arc (const vec2 &center, float radius, float startRadians, float endRadians, bool forward=true)
  • arc (float centerX, float centerY, float radius, float startRadians, float endRadians, bool forward=true)
  • arcTo (const vec2 &p, const vec2 &t, float radius)
  • arcTo (float x, float y, float tanX, float tanY, float radius)
  • bool
    isClosed () const
  • bool
    empty () const
  • clear ()
  • size_t
    getNumSegments () const
  • size_t
    getNumPoints () const
  • std::vector< vec2 >
    subdivide (float approximationScale=1.0f) const
  • const std::vector< vec2 > &
    getPoints () const
  • std::vector< vec2 > &
    getPoints ()
  • const vec2 &
    getPoint (size_t point) const
  • vec2 &
    getPoint (size_t point)
  • const vec2 &
    getCurrentPoint () const
  • setPoint (size_t index, const vec2 &p)
  • getSegmentType (size_t segment) const
  • const std::vector< SegmentType > &
    getSegments () const
  • std::vector< SegmentType > &
    getSegments ()
  • removeSegment (size_t segment)

Static Public Member Functions

  • int
    calcQuadraticBezierMonotoneRegions (const vec2 p[3], float resultT[2])
  • vec2
    calcQuadraticBezierPos (const vec2 p[3], float t)
  • vec2
    calcQuadraticBezierDerivative (const vec2 p[3], float t)
  • int
    calcCubicBezierMonotoneRegions (const vec2 p[4], float resultT[4])
  • vec2
    calcCubicBezierPos (const vec2 p[4], float t)
  • vec2
    calcCubicBezierDerivative (const vec2 p[4], float t)

Friends

  • friend class
  • friend class
  • friend std::ostream &
    operator<< (std::ostream &out, const Path2d &p)