KHTML
PathTraversalState.cpp
Go to the documentation of this file.
40 return sqrtf((end.x() - start.x()) * (end.x() - start.x()) + (end.y() - start.y()) * (end.y() - start.y()));
77 CubicBezier(const FloatPoint& s, const FloatPoint& c1, const FloatPoint& c2, const FloatPoint& e)
87 return distanceLine(start, control1) + distanceLine(control1, control2) + distanceLine(control2, end);
116// version which does update the PathTraversalState. We'll have to shark it to see if that's necessary.
180float PathTraversalState::quadraticBezierTo(const FloatPoint& newControl, const FloatPoint& newEnd)
182 float distance = curveLength<QuadraticBezier>(*this, QuadraticBezier(m_current, newControl, newEnd));
193float PathTraversalState::cubicBezierTo(const FloatPoint& newControl1, const FloatPoint& newControl2, const FloatPoint& newEnd)
195 float distance = curveLength<CubicBezier>(*this, CubicBezier(m_current, newControl1, newControl2, newEnd));
Definition: FloatPoint.h:61
PathTraversalState(PathTraversalAction)
Definition: PathTraversalState.cpp:150
float quadraticBezierTo(const FloatPoint &newControl, const FloatPoint &newEnd)
Definition: PathTraversalState.cpp:180
float lineTo(const FloatPoint &)
Definition: PathTraversalState.cpp:173
float m_desiredLength
Definition: PathTraversalState.h:67
float cubicBezierTo(const FloatPoint &newControl1, const FloatPoint &newControl2, const FloatPoint &newEnd)
Definition: PathTraversalState.cpp:193
PathTraversalAction
Definition: PathTraversalState.h:41
@ TraversalPointAtLength
Definition: PathTraversalState.h:43
@ TraversalNormalAngleAtLength
Definition: PathTraversalState.h:45
float moveTo(const FloatPoint &)
Definition: PathTraversalState.cpp:167
PathTraversalAction m_action
Definition: PathTraversalState.h:57
const KShortcut & end()
Definition: CSSHelper.h:7
static const float kPathSegmentLengthTolerance
Definition: PathTraversalState.cpp:31
static float curveLength(PathTraversalState &traversalState, CurveType curve)
Definition: PathTraversalState.cpp:120
static float distanceLine(const FloatPoint &start, const FloatPoint &end)
Definition: PathTraversalState.cpp:38
static FloatPoint midPoint(const FloatPoint &first, const FloatPoint &second)
Definition: PathTraversalState.cpp:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.