Krita Source Code Documentation
Loading...
Searching...
No Matches
KoCurveFit.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2001-2003 Rob Buis <buis@kde.org>
3 SPDX-FileCopyrightText: 2007 Jan Hambrecht <jaham@gmx.net>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KOCURVEFIT_H
9#define KOCURVEFIT_H
10
11#include <QList>
12#include <QPointF>
13
14#include "kritaflake_export.h"
15
16class KoPathShape;
17
18/*
19 * Fits bezier curve to given list of points.
20 *
21 * An Algorithm for Automatically Fitting Digitized Curves
22 * by Philip J. Schneider
23 * from "Graphics Gems", Academic Press, 1990
24 *
25 * http://web.archive.org/web/20061118130015/http://www.acm.org/pubs/tog/GraphicsGems/gems/FitCurves.c
26 * http://web.archive.org/web/20040519052901/http://www.acm.org/pubs/tog/GraphicsGems/gems/README
27 *
28 * @param points the list of points to fit curve to
29 * @param error the max. fitting error
30 * @return a path shape representing the fitted curve
31 */
32
33KRITAFLAKE_EXPORT KoPathShape * bezierFit(const QList<QPointF> &points, float error);
34
35#endif
36
KRITAFLAKE_EXPORT KoPathShape * bezierFit(const QList< QPointF > &points, float error)
The position of a path point within a path shape.
Definition KoPathShape.h:63