Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QDashStroker Class Reference

#include <qstroker_p.h>

+ Inheritance diagram for QDashStroker:
+ Collaboration diagram for QDashStroker:

Public Member Functions

 QDashStroker (QStroker *stroker)
 
 ~QDashStroker ()
 
QStrokerstroker () const
 
void setDashPattern (const QList< qfixed > &dashPattern)
 
QList< qfixeddashPattern () const
 
void setDashOffset (qreal offset)
 
qreal dashOffset () const
 
void begin (void *data) override
 Prepares the stroker.
 
void end () override
 Finishes the stroke.
 
void setStrokeWidth (qreal width)
 
void setMiterLimit (qreal limit)
 
- Public Member Functions inherited from QStrokerOps
 QStrokerOps ()
 
virtual ~QStrokerOps ()
 
void setMoveToHook (qStrokerMoveToHook moveToHook)
 
void setLineToHook (qStrokerLineToHook lineToHook)
 
void setCubicToHook (qStrokerCubicToHook cubicToHook)
 
void moveTo (qfixed x, qfixed y)
 
void lineTo (qfixed x, qfixed y)
 
void cubicTo (qfixed x1, qfixed y1, qfixed x2, qfixed y2, qfixed ex, qfixed ey)
 
void strokePath (const QPainterPath &path, void *data, const QTransform &matrix)
 Convenience function that decomposes path into begin(), moveTo(), lineTo(), curevTo() and end() calls.
 
void 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.
 
void strokeEllipse (const QRectF &ellipse, void *data, const QTransform &matrix)
 Convenience function for stroking an ellipse with bounding rect rect.
 
QRectF clipRect () const
 
void setClipRect (const QRectF &clip)
 
void setCurveThresholdFromTransform (const QTransform &transform)
 
void setCurveThreshold (qfixed threshold)
 
qfixed curveThreshold () const
 

Static Public Member Functions

static QList< qfixedpatternForStyle (Qt::PenStyle style)
 
static int repetitionLimit ()
 

Protected Member Functions

void processCurrentSubpath () override
 
- Protected Member Functions inherited from QStrokerOps
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)
 

Protected Attributes

QStrokerm_stroker
 
QList< qfixedm_dashPattern
 
qreal m_dashOffset
 
qreal m_stroke_width
 
qreal m_miter_limit
 
- Protected Attributes inherited from QStrokerOps
QDataBuffer< Elementm_elements
 
QRectF m_clip_rect
 
qfixed m_curveThreshold
 
qfixed m_dashThreshold
 
voidm_customData
 
qStrokerMoveToHook m_moveTo
 
qStrokerLineToHook m_lineTo
 
qStrokerCubicToHook m_cubicTo
 

Detailed Description

Definition at line 226 of file qstroker_p.h.

Constructor & Destructor Documentation

◆ QDashStroker()

QDashStroker::QDashStroker ( QStroker * stroker)

Definition at line 981 of file qstroker.cpp.

References m_stroker, qdashstroker_cubicTo(), qdashstroker_lineTo(), qdashstroker_moveTo(), QStrokerOps::setCubicToHook(), QStrokerOps::setLineToHook(), and QStrokerOps::setMoveToHook().

+ Here is the call graph for this function:

◆ ~QDashStroker()

QDashStroker::~QDashStroker ( )

Definition at line 991 of file qstroker.cpp.

Member Function Documentation

◆ begin()

void QDashStroker::begin ( void * customData)
inlineoverridevirtual

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 from QStrokerOps.

Definition at line 353 of file qstroker_p.h.

References QStrokerOps::begin(), and m_stroker.

Referenced by QDashedStrokeProcessor::process().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dashOffset()

qreal QDashStroker::dashOffset ( ) const
inline

Definition at line 241 of file qstroker_p.h.

◆ dashPattern()

QList< qfixed > QDashStroker::dashPattern ( ) const
inline

Definition at line 238 of file qstroker_p.h.

◆ end()

void QDashStroker::end ( )
inlineoverridevirtual

Finishes the stroke.

Call this function once when an entire primitive has been stroked.

Reimplemented from QStrokerOps.

Definition at line 360 of file qstroker_p.h.

References QStrokerOps::end(), and m_stroker.

Referenced by QDashedStrokeProcessor::process().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ patternForStyle()

QList< qfixed > QDashStroker::patternForStyle ( Qt::PenStyle style)
static

Definition at line 995 of file qstroker.cpp.

References Qt::DashDotDotLine, Qt::DashDotLine, Qt::DashLine, dot(), Qt::DotLine, and qfixed.

Referenced by QPainterPathStroker::setDashPattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processCurrentSubpath()

◆ repetitionLimit()

static int QDashStroker::repetitionLimit ( )
inlinestatic

Definition at line 235 of file qstroker_p.h.

Referenced by processCurrentSubpath(), QRasterPaintEnginePrivate::rasterizeLine_dashed(), and QPaintEngineEx::stroke().

+ Here is the caller graph for this function:

◆ setDashOffset()

void QDashStroker::setDashOffset ( qreal offset)
inline

Definition at line 240 of file qstroker_p.h.

Referenced by QPainterPathStroker::createStroke(), and QDashedStrokeProcessor::process().

+ Here is the caller graph for this function:

◆ setDashPattern()

void QDashStroker::setDashPattern ( const QList< qfixed > & dashPattern)
inline

Definition at line 237 of file qstroker_p.h.

Referenced by QPainterPathStroker::createStroke(), and QDashedStrokeProcessor::process().

+ Here is the caller graph for this function:

◆ setMiterLimit()

void QDashStroker::setMiterLimit ( qreal limit)
inline

Definition at line 247 of file qstroker_p.h.

Referenced by QDashedStrokeProcessor::process().

+ Here is the caller graph for this function:

◆ setStrokeWidth()

void QDashStroker::setStrokeWidth ( qreal width)
inline

Definition at line 246 of file qstroker_p.h.

Referenced by QDashedStrokeProcessor::process().

+ Here is the caller graph for this function:

◆ stroker()

QStroker * QDashStroker::stroker ( ) const
inline

Definition at line 232 of file qstroker_p.h.

Member Data Documentation

◆ m_dashOffset

qreal QDashStroker::m_dashOffset
protected

Definition at line 254 of file qstroker_p.h.

Referenced by processCurrentSubpath().

◆ m_dashPattern

QList<qfixed> QDashStroker::m_dashPattern
protected

Definition at line 253 of file qstroker_p.h.

Referenced by processCurrentSubpath().

◆ m_miter_limit

qreal QDashStroker::m_miter_limit
protected

Definition at line 257 of file qstroker_p.h.

Referenced by processCurrentSubpath().

◆ m_stroke_width

qreal QDashStroker::m_stroke_width
protected

Definition at line 256 of file qstroker_p.h.

Referenced by processCurrentSubpath().

◆ m_stroker

QStroker* QDashStroker::m_stroker
protected

Definition at line 252 of file qstroker_p.h.

Referenced by QDashStroker(), begin(), end(), and processCurrentSubpath().


The documentation for this class was generated from the following files: