4#ifndef QTRIANGULATINGSTROKER_P_H
5#define QTRIANGULATINGSTROKER_P_H
18#include <QtCore/qmath.h>
19#include <QtGui/private/qtguiglobal_p.h>
20#include <private/qdatabuffer_p.h>
22#include <private/qvectorpath_p.h>
23#include <private/qbezier_p.h>
24#include <private/qnumeric_p.h>
25#include <private/qmath_p.h>
33 m_roundness(0), m_sin_theta(0), m_cos_theta(0), m_inv_scale(1), m_curvyness_mul(1), m_curvyness_add(0),
34 m_join_style(
Qt::BevelJoin), m_cap_style(
Qt::SquareCap) {}
39 inline const float *
vertices()
const {
return m_vertices.data(); }
44 inline void emitLineSegment(
float x,
float y,
float nx,
float ny);
45 void moveTo(
const qreal *pts);
46 inline void lineTo(
const qreal *pts);
47 void cubicTo(
const qreal *pts);
48 void join(
const qreal *pts);
49 inline void normalVector(
float x1,
float y1,
float x2,
float y2,
float *
nx,
float *
ny);
50 void endCap(
const qreal *pts);
52 void endCapOrJoinClosed(
const qreal *
start,
const qreal *cur,
bool implicitClose,
bool endsAtStart);
66 float m_curvyness_mul;
67 float m_curvyness_add;
99inline void QTriangulatingStroker::normalVector(
float x1,
float y1,
float x2,
float y2,
100 float *
nx,
float *
ny)
102 const float dx =
x2 -
x1;
103 const float dy =
y2 -
y1;
104 const float pw = m_width /
qHypot(dx, dy);
110inline void QTriangulatingStroker::emitLineSegment(
float x,
float y,
float vx,
float vy)
112 m_vertices.
add(
x + vx);
113 m_vertices.
add(
y + vy);
114 m_vertices.
add(
x - vx);
115 m_vertices.
add(
y - vy);
118void QTriangulatingStroker::lineTo(
const qreal *pts)
120 emitLineSegment(pts[0], pts[1], m_nvx, m_nvy);
QPainterPath::ElementType * elementTypes() const
void setInvScale(qreal invScale)
void addElement(QPainterPath::ElementType type, qreal x, qreal y)
ElementType
This enum describes the types of elements used to connect vertices in subpaths.
\inmodule QtCore\reentrant
const float * vertices() const
void setInvScale(qreal invScale)
Combined button and popup list for selecting options.
auto qHypot(qfloat16 x, qfloat16 y)
GLint GLint GLint GLint GLint x
[0]
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLfixed GLfixed GLint GLint GLfixed points
GLfixed GLfixed GLfixed y2
GLsizei const GLchar *const * path