4#ifndef QOUTLINEMAPPER_P_H
5#define QOUTLINEMAPPER_P_H
18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtCore/qrect.h>
21#include <QtGui/qtransform.h>
22#include <QtGui/qpainterpath.h>
24#define QT_FT_BEGIN_HEADER
25#define QT_FT_END_HEADER
27#include <private/qrasterdefs_p.h>
28#include <private/qdatabuffer_p.h>
35#if Q_PROCESSOR_WORDSIZE == 8
36constexpr int QT_RASTER_COORD_LIMIT = ((1<<23) - 1);
45
46
47
48
49
50
51
52
53
54
69
70
71
72
78 qt_scaleForTransform(m, &scale);
79 m_curve_threshold = scale == 0 ? qreal(0.25) : (qreal(0.25) / scale);
86#ifdef QT_DEBUG_CONVERT
87 printf(
"QOutlineMapper::beginOutline rule=%d\n", fillRule);
91 m_element_types.reset();
95 m_outline.flags = fillRule == Qt::WindingFill
97 : QT_FT_OUTLINE_EVEN_ODD_FILL;
103 void clipElements(
const QPointF *points,
const QPainterPath::ElementType *types,
int count);
105 void convertElements(
const QPointF *points,
const QPainterPath::ElementType *types,
int count);
108#ifdef QT_DEBUG_CONVERT
109 printf(
"QOutlineMapper::moveTo() (%f, %f)\n", pt.x(), pt.y());
112 m_subpath_start = m_elements.size();
114 m_element_types << QPainterPath::MoveToElement;
118#ifdef QT_DEBUG_CONVERT
119 printf(
"QOutlineMapper::lineTo() (%f, %f)\n", pt.x(), pt.y());
122 m_element_types << QPainterPath::LineToElement;
125 void curveTo(
const QPointF &cp1,
const QPointF &cp2,
const QPointF &ep);
128 int element_count = m_elements.size();
129 if (element_count > 0) {
130 if (m_elements.at(element_count-1) != m_elements.at(m_subpath_start)) {
131#ifdef QT_DEBUG_CONVERT
132 printf(
" - implicitly closing\n");
137 QPointF pt = m_elements.at(m_subpath_start);
140 if (m_element_types.size())
QT_FT_Outline * outline()
void clipElements(const QPointF *points, const QPainterPath::ElementType *types, int count)
QDataBuffer< QT_FT_Vector > m_points
void convertElements(const QPointF *points, const QPainterPath::ElementType *types, int count)
void setMatrix(const QTransform &m)
Sets up the matrix to be used for conversion.
void moveTo(const QPointF &pt)
void curveTo(const QPointF &cp1, const QPointF &cp2, const QPointF &ep)
void setClipRect(QRect clipRect)
QDataBuffer< QPointF > m_elements
QPainterPath::ElementType * elementTypes() const
QDataBuffer< char > m_tags
QDataBuffer< int > m_contours
QDataBuffer< QPainterPath::ElementType > m_element_types
QRectF m_clip_trigger_rect
QT_FT_Outline * convertPath(const QPainterPath &path)
void beginOutline(Qt::FillRule fillRule)
void lineTo(const QPointF &pt)
Combined button and popup list for selecting options.
#define qreal_to_fixed_26_6(f)
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
QT_BEGIN_NAMESPACE constexpr int QT_RASTER_COORD_LIMIT