Loading...
Searching...
No Matches
qwt_bezier.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_BEZIER_H
#define QWT_BEZIER_H
#include "qwt_global.h"
class QPointF;
class QPolygonF;
class QWT_EXPORT QwtBezier
{
public:
QwtBezier( double tolerance = 0.5 );
~QwtBezier();
void setTolerance( double tolerance );
double tolerance() const;
QPolygonF toPolygon( const QPointF& p1, const QPointF& cp1,
const QPointF& cp2, const QPointF& p2 ) const;
void appendToPolygon( const QPointF& p1, const QPointF& cp1,
const QPointF& cp2, const QPointF& p2, QPolygonF& polygon ) const;
static QPointF pointAt( const QPointF& p1, const QPointF& cp1,
const QPointF& cp2, const QPointF& p2, double t );
private:
double m_tolerance;
double m_flatness;
};
inline double QwtBezier::tolerance() const
{
return m_tolerance;
}
#endif
QwtBezier
An implementation of the de Casteljau’s Algorithm for interpolating Bézier curves.
Definition qwt_bezier.h:30
QwtBezier::tolerance
double tolerance() const
Definition qwt_bezier.h:56