Krita Source Code Documentation
Loading...
Searching...
No Matches
KisBezierUtils.cpp File Reference
#include "KisBezierUtils.h"
#include <tuple>
#include <QStack>
#include <QDebug>
#include "kis_debug.h"
#include "KisBezierPatch.h"
#include <iostream>
#include <config-gsl.h>
#include <Eigen/Dense>

Go to the source code of this file.

Classes

class  KisBezierUtils::BezierSegment
 

Namespaces

namespace  KisBezierUtils
 

Functions

QPointF KisBezierUtils::calculateGlobalPos (const std::array< QPointF, 12 > &points, const QPointF &localPoint)
 calculates global coordinate corresponding to the patch coordinate (u, v)
 
template<class PatchMethod >
QPointF KisBezierUtils::calculateGlobalPosImpl (const std::array< QPointF, 12 > &points, const QPointF &localPoint)
 
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
 
template<class PatchMethod >
QPointF KisBezierUtils::calculateLocalPosImpl (const std::array< QPointF, 12 > &points, const QPointF &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::curveParamBySegmentLength (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal expectedLength, qreal totalLength, const qreal error)
 
qreal KisBezierUtils::curveProportionByParam (const QPointF p0, const QPointF p1, const QPointF p2, const QPointF p3, qreal t, const qreal error)
 
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)
 
QVector< qreal > KisBezierUtils::intersectWithLineImpl (const QPointF &p0, const QPointF &p1, const QPointF &p2, const QPointF &p3, const QLineF &line, qreal eps, qreal alpha, qreal beta)
 
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)
 
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.
 

Variable Documentation

◆ dstPoint

QPointF dstPoint

Definition at line 504 of file KisBezierUtils.cpp.

◆ M_1

Eigen::Matrix<double, 2, 4> M_1

Definition at line 577 of file KisBezierUtils.cpp.

◆ M_3

Eigen::Matrix4d M_3

Definition at line 575 of file KisBezierUtils.cpp.

◆ M_3rel2abs

Eigen::Matrix4d M_3rel2abs

Definition at line 576 of file KisBezierUtils.cpp.

◆ P

Eigen::Matrix<double, 4, 2> P

Definition at line 587 of file KisBezierUtils.cpp.

◆ p

const Params2D p
private

Definition at line 703 of file KisBezierUtils.cpp.

◆ p0

QPointF p0

Definition at line 499 of file KisBezierUtils.cpp.

◆ p1

QPointF p1

Definition at line 499 of file KisBezierUtils.cpp.

◆ p2

QPointF p2

Definition at line 499 of file KisBezierUtils.cpp.

◆ p3

QPointF p3

Definition at line 499 of file KisBezierUtils.cpp.

◆ PQ_left

Eigen::Matrix<double, 4, 2> PQ_left

Definition at line 580 of file KisBezierUtils.cpp.

◆ PQ_right

Eigen::Matrix<double, 4, 2> PQ_right

Definition at line 581 of file KisBezierUtils.cpp.

◆ Q

Eigen::Matrix<double, 4, 2> Q

Definition at line 588 of file KisBezierUtils.cpp.

◆ q0

QPointF q0

Definition at line 500 of file KisBezierUtils.cpp.

◆ q1

QPointF q1

Definition at line 500 of file KisBezierUtils.cpp.

◆ q2

QPointF q2

Definition at line 500 of file KisBezierUtils.cpp.

◆ q3

QPointF q3

Definition at line 500 of file KisBezierUtils.cpp.

◆ R

Eigen::Matrix<double, 4, 2> R

Definition at line 585 of file KisBezierUtils.cpp.

◆ r0

QPointF r0

Definition at line 501 of file KisBezierUtils.cpp.

◆ r1

QPointF r1

Definition at line 501 of file KisBezierUtils.cpp.

◆ r2

QPointF r2

Definition at line 501 of file KisBezierUtils.cpp.

◆ r3

QPointF r3

Definition at line 501 of file KisBezierUtils.cpp.

◆ RS_bottom

Eigen::Matrix<double, 4, 2> RS_bottom

Definition at line 583 of file KisBezierUtils.cpp.

◆ RS_top

Eigen::Matrix<double, 4, 2> RS_top

Definition at line 582 of file KisBezierUtils.cpp.

◆ S

Eigen::Matrix<double, 4, 2> S

Definition at line 586 of file KisBezierUtils.cpp.

◆ s0

QPointF s0

Definition at line 502 of file KisBezierUtils.cpp.

◆ s1

QPointF s1

Definition at line 502 of file KisBezierUtils.cpp.

◆ s2

QPointF s2

Definition at line 502 of file KisBezierUtils.cpp.

◆ s3

QPointF s3

Definition at line 502 of file KisBezierUtils.cpp.

◆ T_dot_u1

Eigen::Matrix<double, 1, 2> T_dot_u1

Definition at line 597 of file KisBezierUtils.cpp.

◆ T_dot_u3

Eigen::Matrix<double, 1, 4> T_dot_u3

Definition at line 592 of file KisBezierUtils.cpp.

◆ T_dot_v1

Eigen::Matrix<double, 1, 2> T_dot_v1

Definition at line 598 of file KisBezierUtils.cpp.

◆ T_dot_v3

Eigen::Matrix<double, 1, 4> T_dot_v3

Definition at line 593 of file KisBezierUtils.cpp.

◆ T_u1

Eigen::Matrix<double, 1, 2> T_u1

Definition at line 595 of file KisBezierUtils.cpp.

◆ T_u3

Eigen::Matrix<double, 1, 4> T_u3

Definition at line 590 of file KisBezierUtils.cpp.

◆ T_v1

Eigen::Matrix<double, 1, 2> T_v1

Definition at line 596 of file KisBezierUtils.cpp.

◆ T_v3

Eigen::Matrix<double, 1, 4> T_v3

Definition at line 591 of file KisBezierUtils.cpp.

◆ u

qreal u = 0.0
private

Definition at line 701 of file KisBezierUtils.cpp.

◆ v

qreal v = 0.0
private

Definition at line 702 of file KisBezierUtils.cpp.