![]() |
Qt 6.x
The Qt SDK
|
#include <qstroker_p.h>
Classes | |
struct | Element |
Protected Member Functions | |
void | emitMoveTo (qfixed x, qfixed y) |
void | emitLineTo (qfixed x, qfixed y) |
void | emitCubicTo (qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey) |
virtual void | processCurrentSubpath ()=0 |
Definition at line 94 of file qstroker_p.h.
QStrokerOps::QStrokerOps | ( | ) |
Definition at line 148 of file qstroker.cpp.
|
virtual |
Definition at line 159 of file qstroker.cpp.
Prepares the stroker.
Call this function once before starting a stroke by calling moveTo, lineTo or cubicTo.
The customData is passed back through that callback functions and can be used by the user to for instance maintain state information.
Reimplemented in QDashStroker.
Definition at line 171 of file qstroker.cpp.
References m_customData, and m_elements.
Referenced by QDashStroker::begin(), strokeEllipse(), strokePath(), and strokePolygon().
|
inline |
Definition at line 128 of file qstroker_p.h.
|
inline |
Definition at line 298 of file qstroker_p.h.
References c2, QPainterPath::CurveToDataElement, QPainterPath::CurveToElement, e, and m_elements.
Referenced by strokeEllipse(), and strokePath().
|
inline |
Definition at line 139 of file qstroker_p.h.
Referenced by qt_stroke_side().
|
inlineprotected |
Definition at line 277 of file qstroker_p.h.
References m_cubicTo, m_customData, and Q_ASSERT.
Referenced by QStroker::emitCubicTo().
Definition at line 271 of file qstroker_p.h.
References m_customData, m_lineTo, and Q_ASSERT.
Referenced by QStroker::emitLineTo(), and QDashStroker::processCurrentSubpath().
Definition at line 265 of file qstroker_p.h.
References m_customData, m_moveTo, and Q_ASSERT.
Referenced by QStroker::emitMoveTo(), and QDashStroker::processCurrentSubpath().
|
virtual |
Finishes the stroke.
Call this function once when an entire primitive has been stroked.
Reimplemented in QDashStroker.
Definition at line 182 of file qstroker.cpp.
References m_customData, m_elements, and processCurrentSubpath().
Referenced by QDashStroker::end(), strokeEllipse(), strokePath(), and strokePolygon().
Definition at line 292 of file qstroker_p.h.
References e, QPainterPath::LineToElement, and m_elements.
Referenced by QDashedStrokeProcessor::process(), strokePath(), and strokePolygon().
Definition at line 283 of file qstroker_p.h.
References e, m_elements, QPainterPath::MoveToElement, and processCurrentSubpath().
Referenced by QDashedStrokeProcessor::process(), strokeEllipse(), strokePath(), and strokePolygon().
|
protectedpure virtual |
Implemented in QStroker, and QDashStroker.
Referenced by end(), and moveTo().
Definition at line 129 of file qstroker_p.h.
Referenced by QPainterPathStroker::createStroke(), QX11PaintEngine::drawPath(), and QDashedStrokeProcessor::process().
|
inline |
Definition at line 114 of file qstroker_p.h.
References cubicToHook().
Referenced by QDashedStrokeProcessor::QDashedStrokeProcessor(), QDashStroker::QDashStroker(), QPainterPathStrokerPrivate::QPainterPathStrokerPrivate(), and QPdf::Stroker::Stroker().
Definition at line 138 of file qstroker_p.h.
|
inline |
Definition at line 131 of file qstroker_p.h.
References qt_scaleForTransform().
Referenced by strokeEllipse(), strokePath(), and strokePolygon().
|
inline |
Definition at line 113 of file qstroker_p.h.
References lineToHook().
Referenced by QDashedStrokeProcessor::QDashedStrokeProcessor(), QDashStroker::QDashStroker(), QPainterPathStrokerPrivate::QPainterPathStrokerPrivate(), and QPdf::Stroker::Stroker().
|
inline |
Definition at line 112 of file qstroker_p.h.
References moveToHook().
Referenced by QDashedStrokeProcessor::QDashedStrokeProcessor(), QDashStroker::QDashStroker(), QPainterPathStrokerPrivate::QPainterPathStrokerPrivate(), and QPdf::Stroker::Stroker().
void QStrokerOps::strokeEllipse | ( | const QRectF & | rect, |
void * | data, | ||
const QTransform & | matrix | ||
) |
Convenience function for stroking an ellipse with bounding rect rect.
The matrix is used to transform the coordinates before they enter the stroker.
Definition at line 304 of file qstroker.cpp.
References begin(), cubicTo(), end(), i, moveTo(), Q_ASSERT, qt_curves_for_arc(), qt_real_to_fixed, rect, and setCurveThresholdFromTransform().
void QStrokerOps::strokePath | ( | const QPainterPath & | path, |
void * | customData, | ||
const QTransform & | matrix | ||
) |
Convenience function that decomposes path into begin(), moveTo(), lineTo(), curevTo() and end() calls.
The customData parameter is used in the callback functions
The matrix is used to transform the points before input to the stroker.
Definition at line 200 of file qstroker.cpp.
References begin(), cubicTo(), QPainterPath::CurveToElement, e, end(), i, lineTo(), QPainterPath::LineToElement, moveTo(), QPainterPath::MoveToElement, qt_real_to_fixed, setCurveThresholdFromTransform(), QPointF::x(), QPainterPath::Element::x, QPointF::y(), and QPainterPath::Element::y.
Referenced by QPainterPathStroker::createStroke().
void QStrokerOps::strokePolygon | ( | const QPointF * | points, |
int | pointCount, | ||
bool | implicit_close, | ||
void * | data, | ||
const QTransform & | matrix | ||
) |
Convenience function for stroking a polygon of the pointCount first points in points.
If implicit_close is set to true a line is implicitly drawn between the first and last point in the polygon. Typically true for polygons and false for polylines.
The matrix is used to transform the points before they enter the stroker.
Definition at line 271 of file qstroker.cpp.
References begin(), end(), i, lineTo(), moveTo(), qt_real_to_fixed, setCurveThresholdFromTransform(), QPointF::x(), and QPointF::y().
|
protected |
Definition at line 149 of file qstroker_p.h.
Referenced by QDashStroker::processCurrentSubpath().
|
protected |
Definition at line 156 of file qstroker_p.h.
Referenced by emitCubicTo().
|
protected |
Definition at line 150 of file qstroker_p.h.
|
protected |
Definition at line 153 of file qstroker_p.h.
Referenced by begin(), emitCubicTo(), emitLineTo(), emitMoveTo(), end(), and QDashStroker::processCurrentSubpath().
|
protected |
Definition at line 151 of file qstroker_p.h.
Referenced by QDashStroker::processCurrentSubpath().
|
protected |
Definition at line 147 of file qstroker_p.h.
Referenced by begin(), cubicTo(), end(), lineTo(), moveTo(), QStroker::processCurrentSubpath(), and QDashStroker::processCurrentSubpath().
|
protected |
Definition at line 155 of file qstroker_p.h.
Referenced by emitLineTo().
|
protected |
Definition at line 154 of file qstroker_p.h.
Referenced by emitMoveTo().