Krita Source Code Documentation
Loading...
Searching...
No Matches
KoPathShape.cpp File Reference
#include "KoPathShape.h"
#include "KoPathShape_p.h"
#include "KoPathSegment.h"
#include "KoPathPoint.h"
#include "KoShapeStrokeModel.h"
#include "KoPathShapeLoader.h"
#include "KoShapeSavingContext.h"
#include "KoShapeLoadingContext.h"
#include "KoShapeBackground.h"
#include "KoShapeContainer.h"
#include "KoMarker.h"
#include "KoShapeStroke.h"
#include "KoInsets.h"
#include <KoUnit.h>
#include "KisQPainterStateSaver.h"
#include <FlakeDebug.h>
#include <QPainter>
#include <QPainterPath>
#include "kis_global.h"
#include <kis_algebra_2d.h>
#include <qnumeric.h>

Go to the source code of this file.

Functions

char nodeType (const KoPathPoint *point)
 
static bool qIsNaNPoint (const QPointF &p)
 
void updateNodeType (KoPathPoint *point, const QChar &nodeType)
 

Function Documentation

◆ nodeType()

char nodeType ( const KoPathPoint * point)

Definition at line 1152 of file KoPathShape.cpp.

1153{
1154 if (point->properties() & KoPathPoint::IsSmooth) {
1155 return 's';
1156 }
1157 else if (point->properties() & KoPathPoint::IsSymmetric) {
1158 return 'z';
1159 }
1160 else {
1161 return 'c';
1162 }
1163}
PointProperties properties
@ IsSmooth
it is smooth, both control points on a line through the point
Definition KoPathPoint.h:41
@ IsSymmetric
it is symmetric, like smooth but control points have same distance to point
Definition KoPathPoint.h:42

References KoPathPoint::IsSmooth, KoPathPoint::IsSymmetric, and KoPathPoint::properties.

◆ qIsNaNPoint()

static bool qIsNaNPoint ( const QPointF & p)
static

Definition at line 36 of file KoPathShape.cpp.

36 {
37 return qIsNaN(p.x()) || qIsNaN(p.y());
38}
const Params2D p

References p.

◆ updateNodeType()

void updateNodeType ( KoPathPoint * point,
const QChar & nodeType )

Definition at line 1189 of file KoPathShape.cpp.

1190{
1191 if (nodeType == 's') {
1193 }
1194 else if (nodeType == 'z') {
1196 }
1197}
char nodeType(const KoPathPoint *point)
void setProperty(PointProperty property)
Sets a single property of a point.

References KoPathPoint::IsSmooth, KoPathPoint::IsSymmetric, nodeType(), and KoPathPoint::setProperty().