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 "KoShapeShadow.h"
#include "KoShapeBackground.h"
#include "KoShapeContainer.h"
#include "KoFilterEffectStack.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 <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 1164 of file KoPathShape.cpp.

1165{
1166 if (point->properties() & KoPathPoint::IsSmooth) {
1167 return 's';
1168 }
1169 else if (point->properties() & KoPathPoint::IsSymmetric) {
1170 return 'z';
1171 }
1172 else {
1173 return 'c';
1174 }
1175}
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 37 of file KoPathShape.cpp.

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

References p.

◆ updateNodeType()

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

Definition at line 1201 of file KoPathShape.cpp.

1202{
1203 if (nodeType == 's') {
1205 }
1206 else if (nodeType == 'z') {
1208 }
1209}
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().