File indexing completed on 2024-05-12 15:56:39
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2001-2003 Rob Buis <buis@kde.org> 0003 SPDX-FileCopyrightText: 2007 Jan Hambrecht <jaham@gmx.net> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef KOCURVEFIT_H 0009 #define KOCURVEFIT_H 0010 0011 #include <QList> 0012 #include <QPointF> 0013 0014 #include "kritaflake_export.h" 0015 0016 class KoPathShape; 0017 0018 /* 0019 * Fits bezier curve to given list of points. 0020 * 0021 * An Algorithm for Automatically Fitting Digitized Curves 0022 * by Philip J. Schneider 0023 * from "Graphics Gems", Academic Press, 1990 0024 * 0025 * http://web.archive.org/web/20061118130015/http://www.acm.org/pubs/tog/GraphicsGems/gems/FitCurves.c 0026 * http://web.archive.org/web/20040519052901/http://www.acm.org/pubs/tog/GraphicsGems/gems/README 0027 * 0028 * @param points the list of points to fit curve to 0029 * @param error the max. fitting error 0030 * @return a path shape representing the fitted curve 0031 */ 0032 0033 KRITAFLAKE_EXPORT KoPathShape * bezierFit(const QList<QPointF> &points, float error); 0034 0035 #endif 0036