56 #include "QtGui/qpainterpath.h" 57 #include "private/qdatabuffer_p.h" 58 #include "private/qnumeric_p.h" 64 #if defined QFIXED_IS_26_6 66 #define qt_real_to_fixed(real) qfixed(real * 64) 67 #define qt_int_to_fixed(real) qfixed(int(real) << 6) 68 #define qt_fixed_to_real(fixed) qreal(fixed / qreal(64)) 69 #define qt_fixed_to_int(fixed) int(fixed >> 6) 77 #elif defined QFIXED_IS_32_32 79 #define qt_real_to_fixed(real) qfixed(real * double(qint64(1) << 32)) 80 #define qt_fixed_to_real(fixed) qreal(fixed / double(qint64(1) << 32)) 88 #elif defined QFIXED_IS_16_16 90 #define qt_real_to_fixed(real) qfixed(real * qreal(1 << 16)) 91 #define qt_fixed_to_real(fixed) qreal(fixed / qreal(1 << 16)) 101 #define qt_real_to_fixed(real) qfixed(real) 102 #define qt_fixed_to_real(fixed) fixed 113 #define QT_PATH_KAPPA 0.5522847498 116 QPointF *controlPoints,
int *point_count);
152 virtual void begin(
void *customData);
160 void strokePolygon(
const QPointF *points,
int pointCount,
bool implicit_close,
162 void strokeEllipse(
const QRectF &ellipse,
void *data,
const QTransform &matrix);
171 m_dashThreshold = scale == 0 ?
qreal(0.5) : (
qreal(0.5) / scale);
182 virtual void processCurrentSubpath() = 0;
238 virtual void processCurrentSubpath();
268 virtual void begin(
void *
data);
275 virtual void processCurrentSubpath();
293 m_moveTo(x, y, m_customData);
299 m_lineTo(x, y, m_customData);
305 m_cubicTo(c1x, c1y, c2x, c2y, ex, ey, m_customData);
310 if (m_elements.size()>1)
311 processCurrentSubpath();
358 if (c2x == ex && c2y == ey) {
359 if (c1x == ex && c1y == ey) {
381 m_stroker->begin(data);
394 #endif // QSTROKER_P_H
bool operator==(const qfixed2d &other) const
qStrokerLineToHook m_lineTo
qfixed strokeWidth() const
ElementType
This enum describes the types of elements used to connect vertices in subpaths.
void setClipRect(const QRectF &clip)
QDataBuffer< Element > m_elements
qStrokerMoveToHook m_moveTo
#define QT_END_NAMESPACE
This macro expands to.
QPainterPath::ElementType type
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
void lineTo(qfixed x, qfixed y)
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
void emitCubicTo(qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey)
void setDashOffset(qreal offset)
void emitLineTo(qfixed x, qfixed y)
void setStrokeWidth(qfixed width)
The QPointF class defines a point in the plane using floating point precision.
LineJoinMode capStyleMode() const
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
void emitCubicTo(qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey)
void setJoinStyle(Qt::PenJoinStyle style)
qreal qt_t_for_arc_angle(qreal angle)
void(* qStrokerMoveToHook)(qfixed x, qfixed y, void *data)
qStrokerCubicToHook m_cubicTo
void setDashPattern(const QVector< qfixed > &dashPattern)
void setCurveThresholdFromTransform(const QTransform &transform)
QPointF qt_curves_for_arc(const QRectF &rect, qreal startAngle, qreal sweepLength, QPointF *controlPoints, int *point_count)
Creates a number of curves for a given arc definition.
void setCurveThreshold(qfixed threshold)
void setCubicToHook(qStrokerCubicToHook cubicToHook)
void cubicTo(qfixed x1, qfixed y1, qfixed x2, qfixed y2, qfixed ex, qfixed ey)
void emitMoveTo(qfixed x, qfixed y)
void setMiterLimit(qreal limit)
The QLineF class provides a two-dimensional vector using floating point precision.
virtual void end()
Finishes the stroke.
static void moveToHook(qfixed x, qfixed y, void *data)
void emitMoveTo(qfixed x, qfixed y)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
virtual void begin(void *data)
Prepares the stroker.
void setCapStyle(Qt::PenCapStyle capStyle)
QVector< qfixed > m_dashPattern
static const char * data(const QByteArray &arr)
LineJoinMode joinStyleMode() const
void(* qStrokerLineToHook)(qfixed x, qfixed y, void *data)
virtual void end()
Finishes the stroke.
qfixed miterLimit() const
qfixed curveThreshold() const
virtual void begin(void *customData)
Prepares the stroker.
qreal angle(const QPointF &p1, const QPointF &p2)
static void cubicToHook(qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey, void *data)
QStroker * stroker() const
void setMiterLimit(qfixed length)
static void lineToHook(qfixed x, qfixed y, void *data)
QVector< qfixed > dashPattern() const
void setLineToHook(qStrokerLineToHook lineToHook)
void(* qStrokerCubicToHook)(qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey, void *data)
void moveTo(qfixed x, qfixed y)
void setMoveToHook(qStrokerMoveToHook moveToHook)
Qt::PenCapStyle capStyle() const
Qt::PenJoinStyle joinStyle() const
static const KeyPair *const end
void emitLineTo(qfixed x, qfixed y)
void setStrokeWidth(qreal width)