Krita Source Code Documentation
Loading...
Searching...
No Matches
KoPathTool.cpp File Reference
#include "KoPathTool.h"
#include "KoCanvasBase.h"
#include "KoDocumentResourceManager.h"
#include "KoParameterChangeStrategy.h"
#include "KoParameterShape.h"
#include "KoPathPoint.h"
#include "KoPathPointRubberSelectStrategy.h"
#include "KoPathSegmentChangeStrategy.h"
#include "KoPathShape_p.h"
#include "KoPathToolHandle.h"
#include "KoPointerEvent.h"
#include "KoSelectedShapesProxy.h"
#include "KoSelection.h"
#include "KoShapeController.h"
#include "KoShapeGroup.h"
#include "KoShapeManager.h"
#include "KoSnapGuide.h"
#include "KoToolBase_p.h"
#include "KoToolManager.h"
#include "KoViewConverter.h"
#include "PathToolOptionWidget.h"
#include "commands/KoParameterToPathCommand.h"
#include "commands/KoPathBreakAtPointCommand.h"
#include "commands/KoPathPointInsertCommand.h"
#include "commands/KoPathPointRemoveCommand.h"
#include "commands/KoPathPointTypeCommand.h"
#include "commands/KoPathSegmentBreakCommand.h"
#include "commands/KoPathSegmentTypeCommand.h"
#include "commands/KoSubpathJoinCommand.h"
#include "kis_action_registry.h"
#include "kis_command_utils.h"
#include "kis_pointer_utils.h"
#include <KisHandlePainterHelper.h>
#include <KoShapeStrokeModel.h>
#include <commands/KoKeepShapesSelectedCommand.h>
#include <commands/KoMultiPathPointJoinCommand.h>
#include <commands/KoMultiPathPointMergeCommand.h>
#include <commands/KoShapeGroupCommand.h>
#include <text/KoSvgTextShape.h>
#include <KoIcon.h>
#include <QMenu>
#include <QAction>
#include <FlakeDebug.h>
#include <klocalizedstring.h>
#include <QPainter>
#include <QPainterPath>
#include <QBitmap>
#include <QTabWidget>
#include <math.h>

Go to the source code of this file.

Classes

struct  KoPathTool::PathSegment
 

Functions

qreal squaredDistance (const QPointF &p1, const QPointF &p2)
 

Function Documentation

◆ squaredDistance()

qreal squaredDistance ( const QPointF & p1,
const QPointF & p2 )

Definition at line 64 of file KoPathTool.cpp.

65{
66 qreal dx = p1.x()-p2.x();
67 qreal dy = p1.y()-p2.y();
68 return dx*dx + dy*dy;
69}
QPointF p2
QPointF p1

References p1, and p2.