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
QOutlineMapper Class Reference

#include <qoutlinemapper_p.h>

+ Collaboration diagram for QOutlineMapper:

Public Member Functions

 QOutlineMapper ()
 
void setMatrix (const QTransform &m)
 Sets up the matrix to be used for conversion.
 
void setClipRect (QRect clipRect)
 
void beginOutline (Qt::FillRule fillRule)
 
void endOutline ()
 
void clipElements (const QPointF *points, const QPainterPath::ElementType *types, int count)
 
void convertElements (const QPointF *points, const QPainterPath::ElementType *types, int count)
 
void moveTo (const QPointF &pt)
 
void lineTo (const QPointF &pt)
 
void curveTo (const QPointF &cp1, const QPointF &cp2, const QPointF &ep)
 
void closeSubpath ()
 
QT_FT_Outlineoutline ()
 
QT_FT_OutlineconvertPath (const QPainterPath &path)
 
QT_FT_OutlineconvertPath (const QVectorPath &path)
 
QPainterPath::ElementTypeelementTypes () const
 

Public Attributes

QDataBuffer< QPainterPath::ElementTypem_element_types
 
QDataBuffer< QPointFm_elements
 
QDataBuffer< QT_FT_Vectorm_points
 
QDataBuffer< char > m_tags
 
QDataBuffer< int > m_contours
 
QRect m_clip_rect
 
QRectF m_clip_trigger_rect
 
QRectF controlPointRect
 
QT_FT_Outline m_outline
 
int m_subpath_start
 
QTransform m_transform
 
qreal m_curve_threshold
 
bool m_valid
 
bool m_in_clip_elements
 

Detailed Description

Definition at line 55 of file qoutlinemapper_p.h.

Constructor & Destructor Documentation

◆ QOutlineMapper()

QOutlineMapper::QOutlineMapper ( )
inline

Definition at line 58 of file qoutlinemapper_p.h.

Member Function Documentation

◆ beginOutline()

void QOutlineMapper::beginOutline ( Qt::FillRule fillRule)
inline

Definition at line 84 of file qoutlinemapper_p.h.

References QT_FT_Outline_::flags, m_contours, m_element_types, m_elements, m_outline, m_points, m_subpath_start, m_tags, m_valid, QT_FT_OUTLINE_EVEN_ODD_FILL, QT_FT_OUTLINE_NONE, QDataBuffer< Type >::reset(), and Qt::WindingFill.

Referenced by convertPath(), and convertPath().

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

◆ clipElements()

void QOutlineMapper::clipElements ( const QPointF * points,
const QPainterPath::ElementType * types,
int count )

Definition at line 326 of file qoutlinemapper.cpp.

References QPainterPath::addRect(), convertPath(), QPainterPath::CurveToElement, elements, QT_FT_Outline_::flags, i, QPainterPath::intersected(), QPainterPath::LineToElement, m_clip_rect, m_in_clip_elements, m_outline, m_transform, m_valid, QPainterPath::MoveToElement, QT_FT_OUTLINE_EVEN_ODD_FILL, QTransform::reset(), and Qt::WindingFill.

Referenced by endOutline().

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

◆ closeSubpath()

void QOutlineMapper::closeSubpath ( )
inline

Definition at line 127 of file qoutlinemapper_p.h.

References QDataBuffer< Type >::at(), lineTo(), m_element_types, m_elements, m_subpath_start, and QDataBuffer< Type >::size().

Referenced by endOutline(), and moveTo().

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

◆ convertElements()

void QOutlineMapper::convertElements ( const QPointF * points,
const QPainterPath::ElementType * types,
int count )

Definition at line 229 of file qoutlinemapper.cpp.

References QT_FT_Outline_::contours, QPainterPath::CurveToElement, QDataBuffer< Type >::data(), elements, i, QPainterPath::LineToElement, m_contours, m_outline, m_points, m_tags, QPainterPath::MoveToElement, QT_FT_Outline_::n_contours, QT_FT_Outline_::n_points, QT_FT_Outline_::points, qreal_to_fixed_26_6, QT_FT_CURVE_TAG_CUBIC, QT_FT_CURVE_TAG_ON, QDataBuffer< Type >::size(), QT_FT_Outline_::tags, QPointF::x(), QT_FT_Vector_::x, QPointF::y(), and QT_FT_Vector_::y.

Referenced by endOutline().

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

◆ convertPath() [1/2]

QT_FT_Outline * QOutlineMapper::convertPath ( const QPainterPath & path)

Definition at line 87 of file qoutlinemapper.cpp.

References beginOutline(), curveTo(), QPainterPath::CurveToElement, endOutline(), lineTo(), QPainterPath::LineToElement, moveTo(), QPainterPath::MoveToElement, outline(), and Q_ASSERT.

Referenced by clipElements(), and endOutline().

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

◆ convertPath() [2/2]

QT_FT_Outline * QOutlineMapper::convertPath ( const QVectorPath & path)

Definition at line 125 of file qoutlinemapper.cpp.

References beginOutline(), curveTo(), QPainterPath::CurveToElement, QDataBuffer< Type >::data(), elements, endOutline(), lineTo(), QPainterPath::LineToElement, m_element_types, m_elements, moveTo(), QPainterPath::MoveToElement, Qt::OddEvenFill, outline(), QDataBuffer< Type >::resize(), and Qt::WindingFill.

+ Here is the call graph for this function:

◆ curveTo()

void QOutlineMapper::curveTo ( const QPointF & cp1,
const QPointF & cp2,
const QPointF & ep )

Definition at line 58 of file qoutlinemapper.cpp.

References QBezier::addToPolygon(), QBezier::bounds(), contains(), QBezier::fromPoints(), i, QRect::intersects(), QDataBuffer< Type >::last(), lineTo(), QPainterPath::LineToElement, m_clip_rect, m_curve_threshold, m_element_types, m_elements, m_transform, QTransform::map(), QTransform::mapRect(), Q_ASSERT, QDataBuffer< Type >::reserve(), QDataBuffer< Type >::size(), QPointF::x(), and QPointF::y().

Referenced by convertPath(), and convertPath().

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

◆ elementTypes()

QPainterPath::ElementType * QOutlineMapper::elementTypes ( ) const
inline

Definition at line 158 of file qoutlinemapper_p.h.

References QDataBuffer< Type >::data(), m_element_types, nullptr, and QDataBuffer< Type >::size().

Referenced by endOutline().

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

◆ endOutline()

void QOutlineMapper::endOutline ( )

Definition at line 177 of file qoutlinemapper.cpp.

References boundingRect(), clipElements(), closeSubpath(), QRectF::contains(), controlPointRect, convertElements(), convertPath(), QDataBuffer< Type >::data(), elements, elementTypes(), QT_FT_Outline_::flags, QRect::height(), QRectF::height(), i, QDataBuffer< Type >::isEmpty(), QTransform::isIdentity(), m_clip_rect, m_clip_trigger_rect, m_element_types, m_elements, m_in_clip_elements, m_outline, m_transform, m_valid, QTransform::map(), QT_FT_OUTLINE_EVEN_ODD_FILL, QTransform::reset(), QDataBuffer< Type >::size(), QTransform::TxProject, QTransform::type(), QRect::width(), QRectF::width(), Qt::WindingFill, QRect::x(), QRectF::x(), QRect::y(), and QRectF::y().

Referenced by convertPath(), and convertPath().

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

◆ lineTo()

void QOutlineMapper::lineTo ( const QPointF & pt)
inline

Definition at line 117 of file qoutlinemapper_p.h.

References QDataBuffer< Type >::add(), QPainterPath::LineToElement, m_element_types, m_elements, QPointF::x(), and QPointF::y().

Referenced by closeSubpath(), convertPath(), convertPath(), and curveTo().

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

◆ moveTo()

void QOutlineMapper::moveTo ( const QPointF & pt)
inline

Definition at line 107 of file qoutlinemapper_p.h.

References closeSubpath(), m_element_types, m_elements, m_subpath_start, QPainterPath::MoveToElement, QDataBuffer< Type >::size(), QPointF::x(), and QPointF::y().

Referenced by convertPath(), and convertPath().

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

◆ outline()

QT_FT_Outline * QOutlineMapper::outline ( )
inline

Definition at line 149 of file qoutlinemapper_p.h.

References m_outline, and m_valid.

Referenced by convertPath(), and convertPath().

+ Here is the caller graph for this function:

◆ setClipRect()

void QOutlineMapper::setClipRect ( QRect clipRect)

Definition at line 40 of file qoutlinemapper.cpp.

References QRect::adjusted(), m_clip_rect, m_clip_trigger_rect, qMin(), and QT_RASTER_COORD_LIMIT.

+ Here is the call graph for this function:

◆ setMatrix()

void QOutlineMapper::setMatrix ( const QTransform & m)
inline

Sets up the matrix to be used for conversion.

This also sets up the qt_path_iterator function that is used as a callback to get points.

Definition at line 73 of file qoutlinemapper_p.h.

References m_curve_threshold, m_transform, and qt_scaleForTransform().

+ Here is the call graph for this function:

Member Data Documentation

◆ controlPointRect

QRectF QOutlineMapper::controlPointRect

Definition at line 169 of file qoutlinemapper_p.h.

Referenced by endOutline().

◆ m_clip_rect

QRect QOutlineMapper::m_clip_rect

Definition at line 167 of file qoutlinemapper_p.h.

Referenced by clipElements(), curveTo(), endOutline(), and setClipRect().

◆ m_clip_trigger_rect

QRectF QOutlineMapper::m_clip_trigger_rect

Definition at line 168 of file qoutlinemapper_p.h.

Referenced by endOutline(), and setClipRect().

◆ m_contours

QDataBuffer<int> QOutlineMapper::m_contours

Definition at line 165 of file qoutlinemapper_p.h.

Referenced by beginOutline(), and convertElements().

◆ m_curve_threshold

qreal QOutlineMapper::m_curve_threshold

Definition at line 177 of file qoutlinemapper_p.h.

Referenced by curveTo(), and setMatrix().

◆ m_element_types

QDataBuffer<QPainterPath::ElementType> QOutlineMapper::m_element_types

◆ m_elements

QDataBuffer<QPointF> QOutlineMapper::m_elements

◆ m_in_clip_elements

bool QOutlineMapper::m_in_clip_elements

Definition at line 180 of file qoutlinemapper_p.h.

Referenced by clipElements(), and endOutline().

◆ m_outline

QT_FT_Outline QOutlineMapper::m_outline

Definition at line 171 of file qoutlinemapper_p.h.

Referenced by beginOutline(), clipElements(), convertElements(), endOutline(), and outline().

◆ m_points

QDataBuffer<QT_FT_Vector> QOutlineMapper::m_points

Definition at line 163 of file qoutlinemapper_p.h.

Referenced by beginOutline(), and convertElements().

◆ m_subpath_start

int QOutlineMapper::m_subpath_start

Definition at line 173 of file qoutlinemapper_p.h.

Referenced by beginOutline(), closeSubpath(), and moveTo().

◆ m_tags

QDataBuffer<char> QOutlineMapper::m_tags

Definition at line 164 of file qoutlinemapper_p.h.

Referenced by beginOutline(), and convertElements().

◆ m_transform

QTransform QOutlineMapper::m_transform

Definition at line 175 of file qoutlinemapper_p.h.

Referenced by clipElements(), curveTo(), endOutline(), and setMatrix().

◆ m_valid

bool QOutlineMapper::m_valid

Definition at line 179 of file qoutlinemapper_p.h.

Referenced by beginOutline(), clipElements(), endOutline(), and outline().


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