5#ifndef QOUTLINEMAPPER_P_H
6#define QOUTLINEMAPPER_P_H
19#include <QtGui/private/qtguiglobal_p.h>
20#include <QtCore/qrect.h>
22#include <QtGui/qtransform.h>
23#include <QtGui/qpainterpath.h>
25#define QT_FT_BEGIN_HEADER
26#define QT_FT_END_HEADER
28#include <private/qrasterdefs_p.h>
29#include <private/qdatabuffer_p.h>
36#if Q_PROCESSOR_WORDSIZE == 8
37constexpr int QT_RASTER_COORD_LIMIT = ((1<<23) - 1);
46
47
48
49
50
51
52
53
54
55
70
71
72
73
79 qt_scaleForTransform(m, &scale);
80 m_curve_threshold = scale == 0 ? qreal(0.25) : (qreal(0.25) / scale);
87#ifdef QT_DEBUG_CONVERT
88 printf(
"QOutlineMapper::beginOutline rule=%d\n", fillRule);
92 m_element_types.reset();
96 m_outline.flags = fillRule == Qt::WindingFill
98 : QT_FT_OUTLINE_EVEN_ODD_FILL;
104 void clipElements(
const QPointF *points,
const QPainterPath::ElementType *types,
int count);
106 void convertElements(
const QPointF *points,
const QPainterPath::ElementType *types,
int count);
109#ifdef QT_DEBUG_CONVERT
110 printf(
"QOutlineMapper::moveTo() (%f, %f)\n", pt.x(), pt.y());
113 m_subpath_start = m_elements.size();
115 m_element_types << QPainterPath::MoveToElement;
119#ifdef QT_DEBUG_CONVERT
120 printf(
"QOutlineMapper::lineTo() (%f, %f)\n", pt.x(), pt.y());
123 m_element_types << QPainterPath::LineToElement;
126 void curveTo(
const QPointF &cp1,
const QPointF &cp2,
const QPointF &ep);
129 int element_count = m_elements.size();
130 if (element_count > 0) {
131 if (m_elements.at(element_count-1) != m_elements.at(m_subpath_start)) {
132#ifdef QT_DEBUG_CONVERT
133 printf(
" - implicitly closing\n");
138 QPointF pt = m_elements.at(m_subpath_start);
141 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