qwt_spline_curve_fitter.cpp
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
11 #include "qwt_spline_local.h"
13 
14 #include <qpolygon.h>
15 #include <qpainterpath.h>
16 
20 {
23 }
24 
27 {
28  delete d_spline;
29 }
30 
41 {
42  if ( d_spline == spline )
43  return;
44 
45  delete d_spline;
46  d_spline = spline;
47 }
48 
54 {
55  return d_spline;
56 }
57 
63 {
64  return d_spline;
65 }
66 
75 QPolygonF QwtSplineCurveFitter::fitCurve( const QPolygonF &points ) const
76 {
77  const QPainterPath path = fitCurvePath( points );
78 
79  const QList<QPolygonF> subPaths = path.toSubpathPolygons();
80  if ( subPaths.size() == 1 )
81  subPaths.first();
82 
83  return QPolygonF();
84 }
85 
94 QPainterPath QwtSplineCurveFitter::fitCurvePath( const QPolygonF &points ) const
95 {
96  QPainterPath path;
97 
98  if ( d_spline )
99  path = d_spline->painterPath( points );
100 
101  return path;
102 }
Base class for all splines.
Definition: qwt_spline.h:54
const QwtSpline * spline() const
virtual QPainterPath fitCurvePath(const QPolygonF &) const QWT_OVERRIDE
virtual ~QwtSplineCurveFitter()
Destructor.
virtual QPolygonF fitCurve(const QPolygonF &) const QWT_OVERRIDE
void setParametrization(int type)
Definition: qwt_spline.cpp:576
virtual QPainterPath painterPath(const QPolygonF &) const =0
Abstract base class for a curve fitter.
A spline with C1 continuity.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10