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)
  • void
    lineTo (const vec2 &p)
  • void
    lineTo (float x, float y)
  • void
    quadTo (const vec2 &p1, const vec2 &p2)
  • void
    quadTo (float x1, float y1, float x2, float y2)
  • void
    curveTo (const vec2 &p1, const vec2 &p2, const vec2 &p3)
  • void
    curveTo (float x1, float y1, float x2, float y2, float x3, float y3)
  • void
    arc (const vec2 &center, float radius, float startRadians, float endRadians, bool forward=true)
  • void
    arc (float centerX, float centerY, float radius, float startRadians, float endRadians, bool forward=true)
  • void
    arcTo (const vec2 &p, const vec2 &t, float radius)
  • void
    arcTo (float x, float y, float tanX, float tanY, float radius)
  • bool
    isClosed () const
  • bool
    empty () const
  • void
    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
  • void
    setPoint (size_t index, const vec2 &p)
  • getSegmentType (size_t segment) const
  • const std::vector< SegmentType > &
    getSegments () const
  • std::vector< SegmentType > &
    getSegments ()
  • void
    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 CI_API std::ostream &
    operator<< (std::ostream &out, const Path2d &p)