Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QStroker Class Reference

#include <qstroker_p.h>

Inheritance diagram for QStroker:
Collaboration diagram for QStroker:

Public Types

enum  LineJoinMode {
  FlatJoin , SquareJoin , MiterJoin , RoundJoin ,
  RoundCap , SvgMiterJoin
}

Public Member Functions

 QStroker ()
 ~QStroker ()
void setStrokeWidth (qfixed width)
qfixed strokeWidth () const
void setCapStyle (Qt::PenCapStyle capStyle)
Qt::PenCapStyle capStyle () const
LineJoinMode capStyleMode () const
void setJoinStyle (Qt::PenJoinStyle style)
Qt::PenJoinStyle joinStyle () const
LineJoinMode joinStyleMode () const
void setMiterLimit (qfixed length)
qfixed miterLimit () const
void setForceOpen (bool state)
bool forceOpen () const
void joinPoints (qfixed x, qfixed y, const QLineF &nextLine, LineJoinMode join)
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)
Public Member Functions inherited from QStrokerOps
 QStrokerOps ()
virtual ~QStrokerOps ()
void setMoveToHook (qStrokerMoveToHook moveToHook)
void setLineToHook (qStrokerLineToHook lineToHook)
void setCubicToHook (qStrokerCubicToHook cubicToHook)
virtual void begin (void *customData)
 Prepares the stroker.
virtual void end ()
 Finishes the stroke.
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

Protected Member Functions

void processCurrentSubpath () override
 This function is called to stroke the currently built up subpath.
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)

Static Protected Member Functions

static Qt::PenCapStyle capForJoinMode (LineJoinMode mode)
static LineJoinMode joinModeForCap (Qt::PenCapStyle)
static Qt::PenJoinStyle joinForJoinMode (LineJoinMode mode)
static LineJoinMode joinModeForJoin (Qt::PenJoinStyle joinStyle)

Protected Attributes

qfixed m_strokeWidth
qfixed m_miterLimit
LineJoinMode m_capStyle
LineJoinMode m_joinStyle
qfixed m_back1X
qfixed m_back1Y
qfixed m_back2X
qfixed m_back2Y
bool m_forceOpen
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 160 of file qstroker_p.h.

Member Enumeration Documentation

◆ LineJoinMode

Enumerator
FlatJoin 
SquareJoin 
MiterJoin 
RoundJoin 
RoundCap 
SvgMiterJoin 

Definition at line 164 of file qstroker_p.h.

Constructor & Destructor Documentation

◆ QStroker()

QStroker::QStroker ( )

Definition at line 330 of file qstroker.cpp.

◆ ~QStroker()

QStroker::~QStroker ( )

Definition at line 340 of file qstroker.cpp.

Member Function Documentation

◆ capForJoinMode()

Qt::PenCapStyle QStroker::capForJoinMode ( LineJoinMode mode)
staticprotected

Definition at line 344 of file qstroker.cpp.

◆ capStyle()

Qt::PenCapStyle QStroker::capStyle ( ) const
inline

Definition at line 184 of file qstroker_p.h.

◆ capStyleMode()

LineJoinMode QStroker::capStyleMode ( ) const
inline

Definition at line 185 of file qstroker_p.h.

◆ emitCubicTo()

void QStroker::emitCubicTo ( qfixed c1x,
qfixed c1y,
qfixed c2x,
qfixed c2y,
qfixed ex,
qfixed ey )
inline

Definition at line 329 of file qstroker_p.h.

◆ emitLineTo()

void QStroker::emitLineTo ( qfixed x,
qfixed y )
inline

Definition at line 320 of file qstroker_p.h.

◆ emitMoveTo()

void QStroker::emitMoveTo ( qfixed x,
qfixed y )
inline

Definition at line 311 of file qstroker_p.h.

◆ forceOpen()

bool QStroker::forceOpen ( ) const
inline

Definition at line 195 of file qstroker_p.h.

◆ joinForJoinMode()

Qt::PenJoinStyle QStroker::joinForJoinMode ( LineJoinMode mode)
staticprotected

Definition at line 358 of file qstroker.cpp.

◆ joinModeForCap()

QStroker::LineJoinMode QStroker::joinModeForCap ( Qt::PenCapStyle style)
staticprotected

Definition at line 351 of file qstroker.cpp.

◆ joinModeForJoin()

QStroker::LineJoinMode QStroker::joinModeForJoin ( Qt::PenJoinStyle joinStyle)
staticprotected

Definition at line 366 of file qstroker.cpp.

◆ joinPoints()

void QStroker::joinPoints ( qfixed focal_x,
qfixed focal_y,
const QLineF & nextLine,
LineJoinMode join )

Definition at line 401 of file qstroker.cpp.

◆ joinStyle()

Qt::PenJoinStyle QStroker::joinStyle ( ) const
inline

Definition at line 188 of file qstroker_p.h.

◆ joinStyleMode()

LineJoinMode QStroker::joinStyleMode ( ) const
inline

Definition at line 189 of file qstroker_p.h.

◆ miterLimit()

qfixed QStroker::miterLimit ( ) const
inline

Definition at line 192 of file qstroker_p.h.

◆ processCurrentSubpath()

void QStroker::processCurrentSubpath ( )
overrideprotectedvirtual

This function is called to stroke the currently built up subpath.

The subpath is cleared when the function completes.

Implements QStrokerOps.

Definition at line 379 of file qstroker.cpp.

◆ setCapStyle()

void QStroker::setCapStyle ( Qt::PenCapStyle capStyle)
inline

Definition at line 183 of file qstroker_p.h.

◆ setForceOpen()

void QStroker::setForceOpen ( bool state)
inline

Definition at line 194 of file qstroker_p.h.

◆ setJoinStyle()

void QStroker::setJoinStyle ( Qt::PenJoinStyle style)
inline

Definition at line 187 of file qstroker_p.h.

◆ setMiterLimit()

void QStroker::setMiterLimit ( qfixed length)
inline

Definition at line 191 of file qstroker_p.h.

◆ setStrokeWidth()

void QStroker::setStrokeWidth ( qfixed width)
inline

Definition at line 176 of file qstroker_p.h.

◆ strokeWidth()

qfixed QStroker::strokeWidth ( ) const
inline

Definition at line 181 of file qstroker_p.h.

Member Data Documentation

◆ m_back1X

qfixed QStroker::m_back1X
protected

Definition at line 217 of file qstroker_p.h.

◆ m_back1Y

qfixed QStroker::m_back1Y
protected

Definition at line 218 of file qstroker_p.h.

◆ m_back2X

qfixed QStroker::m_back2X
protected

Definition at line 220 of file qstroker_p.h.

◆ m_back2Y

qfixed QStroker::m_back2Y
protected

Definition at line 221 of file qstroker_p.h.

◆ m_capStyle

LineJoinMode QStroker::m_capStyle
protected

Definition at line 214 of file qstroker_p.h.

◆ m_forceOpen

bool QStroker::m_forceOpen
protected

Definition at line 223 of file qstroker_p.h.

◆ m_joinStyle

LineJoinMode QStroker::m_joinStyle
protected

Definition at line 215 of file qstroker_p.h.

◆ m_miterLimit

qfixed QStroker::m_miterLimit
protected

Definition at line 212 of file qstroker_p.h.

◆ m_strokeWidth

qfixed QStroker::m_strokeWidth
protected

Definition at line 211 of file qstroker_p.h.


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