![]() |
Qt 6.x
The Qt SDK
|
#include <qoutlinemapper_p.h>
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_Outline * | outline () |
QT_FT_Outline * | convertPath (const QPainterPath &path) |
QT_FT_Outline * | convertPath (const QVectorPath &path) |
QPainterPath::ElementType * | elementTypes () const |
Public Attributes | |
QDataBuffer< QPainterPath::ElementType > | m_element_types |
QDataBuffer< QPointF > | m_elements |
QDataBuffer< QT_FT_Vector > | m_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 |
Definition at line 55 of file qoutlinemapper_p.h.
|
inline |
Definition at line 58 of file qoutlinemapper_p.h.
|
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().
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::isEmpty(), 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().
|
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().
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(), e, 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, QT_FT_Vector_::x, and QT_FT_Vector_::y.
Referenced by endOutline().
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(), Q_ASSERT, and QPainterPath::Element::type.
Referenced by clipElements(), and endOutline().
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.
Definition at line 58 of file qoutlinemapper.cpp.
References QBezier::addToPolygon(), QBezier::bounds(), contains(), QBezier::fromPoints(), i, QRectF::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().
|
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().
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().
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().
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().
|
inline |
Definition at line 149 of file qoutlinemapper_p.h.
References m_outline, and m_valid.
Referenced by convertPath(), and convertPath().
Definition at line 40 of file qoutlinemapper.cpp.
References QRect::adjusted(), m_clip_rect, m_clip_trigger_rect, qMin(), QT_RASTER_COORD_LIMIT, and QRect::setWidth().
|
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().
QRectF QOutlineMapper::controlPointRect |
Definition at line 169 of file qoutlinemapper_p.h.
Referenced by endOutline().
QRect QOutlineMapper::m_clip_rect |
Definition at line 167 of file qoutlinemapper_p.h.
Referenced by clipElements(), curveTo(), endOutline(), and setClipRect().
QRectF QOutlineMapper::m_clip_trigger_rect |
Definition at line 168 of file qoutlinemapper_p.h.
Referenced by endOutline(), and setClipRect().
QDataBuffer<int> QOutlineMapper::m_contours |
Definition at line 165 of file qoutlinemapper_p.h.
Referenced by beginOutline(), and convertElements().
qreal QOutlineMapper::m_curve_threshold |
Definition at line 177 of file qoutlinemapper_p.h.
Referenced by curveTo(), and setMatrix().
QDataBuffer<QPainterPath::ElementType> QOutlineMapper::m_element_types |
Definition at line 161 of file qoutlinemapper_p.h.
Referenced by beginOutline(), closeSubpath(), convertPath(), curveTo(), elementTypes(), endOutline(), lineTo(), and moveTo().
QDataBuffer<QPointF> QOutlineMapper::m_elements |
Definition at line 162 of file qoutlinemapper_p.h.
Referenced by beginOutline(), closeSubpath(), convertPath(), curveTo(), endOutline(), lineTo(), and moveTo().
bool QOutlineMapper::m_in_clip_elements |
Definition at line 180 of file qoutlinemapper_p.h.
Referenced by clipElements(), and endOutline().
QT_FT_Outline QOutlineMapper::m_outline |
Definition at line 171 of file qoutlinemapper_p.h.
Referenced by beginOutline(), clipElements(), convertElements(), endOutline(), and outline().
QDataBuffer<QT_FT_Vector> QOutlineMapper::m_points |
Definition at line 163 of file qoutlinemapper_p.h.
Referenced by beginOutline(), and convertElements().
int QOutlineMapper::m_subpath_start |
Definition at line 173 of file qoutlinemapper_p.h.
Referenced by beginOutline(), closeSubpath(), and moveTo().
QDataBuffer<char> QOutlineMapper::m_tags |
Definition at line 164 of file qoutlinemapper_p.h.
Referenced by beginOutline(), and convertElements().
QTransform QOutlineMapper::m_transform |
Definition at line 175 of file qoutlinemapper_p.h.
Referenced by clipElements(), curveTo(), endOutline(), and setMatrix().
bool QOutlineMapper::m_valid |
Definition at line 179 of file qoutlinemapper_p.h.
Referenced by beginOutline(), clipElements(), endOutline(), and outline().