Krita Source Code Documentation
Loading...
Searching...
No Matches
KisBezierUtils.h File Reference
#include "kritaglobal_export.h"
#include <kis_algebra_2d.h>

Go to the source code of this file.

Namespaces

namespace  KisBezierUtils
 

Functions

QPointF KisBezierUtils::bezierCurve (const QList< QPointF > &points, qreal t)
 
QPointF KisBezierUtils::bezierCurve (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal t)
 
QPointF KisBezierUtils::bezierCurveDeriv (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal t)
 
QPointF KisBezierUtils::bezierCurveDeriv2 (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal t)
 
int KisBezierUtils::bezierDegree (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3)
 
QPointF KisBezierUtils::calculateGlobalPos (const std::array< QPointF, 12 > &points, const QPointF &localPoint)
 calculates global coordinate corresponding to the patch coordinate (u, v)
 
QPointF KisBezierUtils::calculateGlobalPosSVG2 (const std::array< QPointF, 12 > &points, const QPointF &localPoint)
 calculates global coordinate corresponding to the patch coordinate (u, v)
 
QPointF KisBezierUtils::calculateLocalPos (const std::array< QPointF, 12 > &points, const QPointF &globalPoint)
 calculates local (u,v) coordinates of the patch corresponding to globalPoint
 
QPointF KisBezierUtils::calculateLocalPosSVG2 (const std::array< QPointF, 12 > &points, const QPointF &globalPoint)
 calculates local (u,v) coordinates of the patch corresponding to globalPoint
 
int KisBezierUtils::controlPolygonZeros (const QList< QPointF > &controlPoints)
 
qreal KisBezierUtils::curveLength (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, const qreal error)
 
qreal KisBezierUtils::curveLengthAtPoint (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal t, const qreal error)
 
qreal KisBezierUtils::curveParamByProportion (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal proportion, const qreal error)
 
qreal KisBezierUtils::curveProportionByParam (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal t, const qreal error)
 
void KisBezierUtils::deCasteljau (const QPointF &q0, const QPointF &q1, const QPointF &q2, const QPointF &q3, qreal t, QPointF *p0, QPointF *p1, QPointF *p2, QPointF *p3, QPointF *p4)
 
QPointF KisBezierUtils::interpolateQuadric (const QPointF &p0, const QPointF &p2, const QPointF &pt, qreal t)
 Interpolates quadric curve passing through given points.
 
QVector< qreal > KisBezierUtils::intersectWithLine (const QPointF &p0, const QPointF &p1, const QPointF &p2, const QPointF &p3, const QLineF &line, qreal eps)
 
boost::optional< qreal > KisBezierUtils::intersectWithLineNearest (const QPointF &p0, const QPointF &p1, const QPointF &p2, const QPointF &p3, const QLineF &line, const QPointF &nearestAnchor, qreal eps)
 
bool KisBezierUtils::isLinearSegmentByControlPoints (const QPointF &p0, const QPointF &p1, const QPointF &p2, const QPointF &p3, const qreal eps=1e-4)
 
bool KisBezierUtils::isLinearSegmentByDerivatives (const QPointF &p0, const QPointF &d0, const QPointF &p1, const QPointF &d1, const qreal eps=1e-4)
 
QVector< qreal > KisBezierUtils::linearizeCurve (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, const qreal eps)
 
QVector< qreal > KisBezierUtils::mergeLinearizationSteps (const QVector< qreal > &a, const QVector< qreal > &b)
 
qreal KisBezierUtils::nearestPoint (const QList< QPointF > controlPoints, const QPointF &point, qreal *resultDistance, QPointF *resultPoint)
 
std::pair< QPointF, QPointF > KisBezierUtils::offsetSegment (qreal t, const QPointF &offset)
 moves point t of the curve by offset offset
 
std::pair< QPointF, QPointF > KisBezierUtils::removeBezierNode (const QPointF &p0, const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &q1, const QPointF &q2, const QPointF &q3)
 Adjusts position for the bezier control points after removing a node.