QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QwtBezier Class Reference

An implementation of the de Casteljau's Algorithm for interpolating Bézier curves. More...

#include <qwt_bezier.h>

Public Member Functions

 QwtBezier (double tolerance=0.5)
 Constructor with tolerance parameter.
 
 ~QwtBezier ()
 Destructor.
 
void setTolerance (double tolerance)
 Set the tolerance for curve subdivision.
 
double tolerance () const
 Get the tolerance value.
 
QPolygonF toPolygon (const QPointF &p1, const QPointF &cp1, const QPointF &cp2, const QPointF &p2) const
 Interpolate a Bézier curve as a polygon.
 
void appendToPolygon (const QPointF &p1, const QPointF &cp1, const QPointF &cp2, const QPointF &p2, QPolygonF &polygon) const
 Append Bézier curve points to an existing polygon.
 

Static Public Member Functions

static QPointF pointAt (const QPointF &p1, const QPointF &cp1, const QPointF &cp2, const QPointF &p2, double t)
 Find a point on a Bézier curve at parameter t.
 

Detailed Description

An implementation of the de Casteljau's Algorithm for interpolating Bézier curves.

Constructor & Destructor Documentation

◆ QwtBezier()

QwtBezier::QwtBezier ( double  tolerance = 0.5)

Constructor with tolerance parameter.

Constructor.

◆ ~QwtBezier()

QwtBezier::~QwtBezier ( )

Destructor.

Destructor .

Member Function Documentation

◆ appendToPolygon()

void QwtBezier::appendToPolygon ( const QPointF &  p1,
const QPointF &  cp1,
const QPointF &  cp2,
const QPointF &  p2,
QPolygonF &  polygon 
) const

Append Bézier curve points to an existing polygon.

Interpolate a Bézier curve by adding points to a polygon.

◆ pointAt()

QPointF QwtBezier::pointAt ( const QPointF &  p1,
const QPointF &  cp1,
const QPointF &  cp2,
const QPointF &  p2,
double  t 
)
static

Find a point on a Bézier curve at parameter t.

Find a point on a Bézier curve.

◆ setTolerance()

void QwtBezier::setTolerance ( double  tolerance)

Set the tolerance for curve subdivision.

◆ tolerance()

double QwtBezier::tolerance ( ) const
inline

Get the tolerance value.

Returns
Tolerance value used for subdivision

◆ toPolygon()

QPolygonF QwtBezier::toPolygon ( const QPointF &  p1,
const QPointF &  cp1,
const QPointF &  cp2,
const QPointF &  p2 
) const

Interpolate a Bézier curve as a polygon.

Interpolate a Bézier curve by a polygon.


The documentation for this class was generated from the following files: