6#include <QtCore/qmath.h>
7#include <QtCore/qvarlengtharray.h>
8#include <QtCore/qstring.h>
10#include <private/qlocale_tools_p.h>
18 return ((
ch >> 4) == 3) && (
magic >> (
ch & 15));
23 const int maxLen = 255;
71 while(*
t && *
t !=
'.') {
100 while (
str->isSpace())
108 while (
str->isSpace())
114 while (
str->isSpace())
125 qreal a00, a01, a10, a11;
138 thHalf = 0.5 * (th1 - th0);
139 t = (8.0 / 3.0) *
qSin(thHalf * 0.5) *
qSin(thHalf * 0.5) /
qSin(thHalf);
148 a00 *
x2 + a01 *
y2, a10 *
x2 + a11 *
y2,
149 a00 * x3 + a01 * y3, a10 * x3 + a11 * y3);
155 qreal x_axis_rotation,
162 qreal sin_th, cos_th;
163 qreal a00, a01, a10, a11;
165 qreal d, sfactor, sfactor_sq;
166 qreal th0, th1, th_arc;
168 qreal dx, dy, dx1, dy1, Pr1, Pr2, Px, Py, check;
176 dx = (curx -
x) / 2.0;
177 dy = (cury -
y) / 2.0;
178 dx1 = cos_th * dx + sin_th * dy;
179 dy1 = -sin_th * dx + cos_th * dy;
185 check = Px / Pr1 + Py / Pr2;
195 x0 = a00 * curx + a01 * cury;
196 y0 = a10 * curx + a11 * cury;
197 x1 = a00 *
x + a01 *
y;
198 y1 = a10 *
x + a11 *
y;
205 sfactor_sq = 1.0 /
d - 0.25;
206 if (sfactor_sq < 0) sfactor_sq = 0;
207 sfactor =
qSqrt(sfactor_sq);
208 if (sweep_flag == large_arc_flag) sfactor = -sfactor;
209 xc = 0.5 * (
x0 +
x1) - sfactor * (
y1 -
y0);
210 yc = 0.5 * (
y0 +
y1) + sfactor * (
x1 -
x0);
217 if (th_arc < 0 && sweep_flag)
219 else if (th_arc > 0 && !sweep_flag)
224 for (
i = 0;
i < n_segs;
i++) {
226 th0 +
i * th_arc / n_segs,
227 th0 + (
i + 1) * th_arc / n_segs,
228 rx,
ry, x_axis_rotation);
243 while (
str->isSpace())
263 x =
x0 =
num[0] + offsetX;
264 y =
y0 =
num[1] + offsetY;
308 x =
num[0] + offsetX;
309 y =
num[1] + offsetY;
330 x =
num[0] + offsetX;
344 y =
num[0] + offsetY;
398 if (lastMode ==
'c' || lastMode ==
'C' ||
399 lastMode ==
's' || lastMode ==
'S')
420 if (lastMode ==
'c' || lastMode ==
'C' ||
421 lastMode ==
's' || lastMode ==
'S')
477 if (lastMode ==
'q' || lastMode ==
'Q' ||
478 lastMode ==
't' || lastMode ==
'T')
498 if (lastMode ==
'q' || lastMode ==
'Q' ||
499 lastMode ==
't' || lastMode ==
'T')
526 int(sweepFlag), ex, ey, curx, cury);
549 int(sweepFlag), ex, ey, curx, cury);
constexpr char toLatin1() const noexcept
Returns the Latin-1 character equivalent to the QChar, or 0.
constexpr char16_t unicode() const noexcept
Returns the numeric Unicode value of the QChar.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
const QChar * constData() const
Returns a pointer to the data stored in the QString.
qsizetype size() const
Returns the number of characters in this string.
QString & append(QChar c)
const QChar * unicode() const
Returns a Unicode representation of the string.
Q_QUICK_PRIVATE_EXPORT void pathArc(QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation, int large_arc_flag, int sweep_flag, qreal x, qreal y, qreal curx, qreal cury)
bool parsePathDataFast(const QString &dataStr, QPainterPath &path)
Combined button and popup list for selecting options.
qfloat16 qSqrt(qfloat16 f)
constexpr float qDegreesToRadians(float degrees)
constexpr T qAbs(const T &t)
GLint GLint GLint GLint GLint x
[0]
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLenum GLenum GLsizei count
GLuint GLfloat GLfloat y0
GLfixed GLfixed GLint GLint GLfixed points
GLfixed GLfixed GLfixed y2
GLsizei const GLchar *const * path
static QT_BEGIN_NAMESPACE bool isDigit(ushort ch)
static qreal toDouble(const QChar *&str)
static void pathArcSegment(QPainterPath &path, qreal xc, qreal yc, qreal th0, qreal th1, qreal rx, qreal ry, qreal xAxisRotation)
static void parseNumbersArray(const QChar *&str, QVarLengthArray< qreal, 8 > &points)
static void pathArc(QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation, int large_arc_flag, int sweep_flag, qreal x, qreal y, qreal curx, qreal cury)
static const uchar magic[MagicLength]
\inmodule QtCore \reentrant