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 
17 {
20 }
21 
24 {
25  delete d_spline;
26 }
27 
38 {
39  if ( d_spline == spline )
40  return;
41 
42  delete d_spline;
43  d_spline = spline;
44 }
45 
51 {
52  return d_spline;
53 }
54 
60 {
61  return d_spline;
62 }
63 
72 QPolygonF QwtSplineCurveFitter::fitCurve( const QPolygonF &points ) const
73 {
74  const QPainterPath path = fitCurvePath( points );
75 
76  const QList<QPolygonF> subPaths = path.toSubpathPolygons();
77  if ( subPaths.size() == 1 )
78  subPaths.first();
79 
80  return QPolygonF();
81 }
82 
91 QPainterPath QwtSplineCurveFitter::fitCurvePath( const QPolygonF &points ) const
92 {
93  QPainterPath path;
94 
95  if ( d_spline )
96  path = d_spline->painterPath( points );
97 
98  return path;
99 }
virtual QPolygonF fitCurve(const QPolygonF &) const
Base class for all splines.
Definition: qwt_spline.h:53
const QwtSpline * spline() const
GraphId path[kMaxDeadlockPathLen]
virtual ~QwtSplineCurveFitter()
Destructor.
void setParametrization(int type)
Definition: qwt_spline.cpp:574
virtual QPainterPath painterPath(const QPolygonF &) const =0
virtual QPainterPath fitCurvePath(const QPolygonF &) const
Abstract base class for a curve fitter.
A spline with C1 continuity.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18