43 #include <private/qpainterpath_p.h> 52 #define qreal_to_fixed_26_6(f) (int(f * 64)) 60 const QPointF *last = points + pointCount;
61 qreal minx, maxx, miny, maxy;
67 else if (e->
x() > maxx)
71 else if (e->
y() > maxy)
82 #ifdef QT_DEBUG_CONVERT 83 printf(
"QOutlineMapper::convertPath(), size=%d\n", elmCount);
93 if (
index == elmCount - 1)
120 #ifdef QT_DEBUG_CONVERT 121 printf(
"QOutlineMapper::convertPath(VP), size=%d\n", count);
132 switch (elements[
index]) {
134 if (index == count - 1)
144 curveTo(points[index], points[index+1], points[index+2]);
174 if (element_count == 0) {
221 #ifdef QT_DEBUG_CONVERT 222 printf(
" - control point rect (%.2f, %.2f) %.2f x %.2f, clip=(%d,%d, %dx%d)\n",
252 for (
int i=0; i<element_count; ++i) {
285 m_points << cp1_fixed << cp2_fixed << ep_fixed;
302 const QPointF *last = elements + element_count;
323 #ifdef QT_DEBUG_CONVERT 324 printf(
"QOutlineMapper::endOutline\n");
333 printf(
" - %d -- %.2f, %.2f, (%d, %d)\n", i,
357 for (
int i=0; i<element_count; ++i) {
368 path.
cubicTo(elements[i], elements[i+1], elements[i+2]);
377 for (
int i=1; i<element_count; ++i)
ElementType type
the type of element
The QPainterPath::Element class specifies the position and type of a subpath.
bool isEmpty() const
Returns true if either there are no elements in this path, or if the only element is a MoveToElement;...
ElementType
This enum describes the types of elements used to connect vertices in subpaths.
void curveTo(const QPointF &cp1, const QPointF &cp2, const QPointF &ep)
#define QT_FT_OUTLINE_EVEN_ODD_FILL
qreal y() const
Returns the y-coordinate of the rectangle's top edge.
void lineTo(const QPointF &pt)
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
#define QT_FT_CURVE_TAG_CUBIC
#define QT_END_NAMESPACE
This macro expands to.
#define QT_FT_CURVE_TAG_ON
#define qreal_to_fixed_26_6(f)
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
void moveTo(const QPointF &pt)
The QPointF class defines a point in the plane using floating point precision.
qreal left() const
Returns the x-coordinate of the rectangle's left edge.
QPainterPath intersected(const QPainterPath &r) const
Returns a path which is the intersection of this path's fill area and p's fill area.
int width() const
Returns the width of the rectangle.
static const qreal aliasedCoordinateDelta
int height() const
Returns the height of the rectangle.
QDataBuffer< QPointF > m_elements_dev
QDataBuffer< QT_FT_Vector > m_points
const QPainterPath::ElementType * elements() const
void moveTo(const QPointF &p)
Moves the current point to the given point, implicitly starting a new subpath and closing the previou...
const QPainterPath::Element & elementAt(int i) const
Returns the element at the given index in the painter path.
QDataBuffer< char > m_tags
qreal x() const
Returns the x-coordinate of this point.
QT_FT_Outline * outline()
static const QRectF boundingRect(const QPointF *points, int pointCount)
void lineTo(const QPointF &p)
Adds a straight line from the current position to the given endPoint.
QPainterPath::ElementType * elementTypes() const
void setFillRule(Qt::FillRule fillRule)
Sets the fill rule of the painter path to the given fillRule.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
const int QT_RASTER_COORD_LIMIT
void convertElements(const QPointF *points, const QPainterPath::ElementType *types, int count)
qreal height() const
Returns the height of the rectangle.
void addRect(const QRectF &rect)
Adds the given rectangle to this path as a closed subpath.
QDataBuffer< QPointF > m_elements
qreal width() const
Returns the width of the rectangle.
Qt::FillRule fillRule() const
Returns the painter path's currently set fill rule.
bool hasWindingFill() const
int y() const
Returns the y-coordinate of the rectangle's top edge.
qreal x() const
Returns the x-coordinate of the rectangle's left edge.
void beginOutline(Qt::FillRule fillRule)
int x() const
Returns the x-coordinate of the rectangle's left edge.
const qreal * points() const
QDataBuffer< QPainterPath::ElementType > m_element_types
qreal y() const
Returns the y-coordinate of this point.
void cubicTo(const QPointF &ctrlPt1, const QPointF &ctrlPt2, const QPointF &endPt)
Adds a cubic Bezier curve between the current position and the given endPoint using the control point...
static const QTextHtmlElement elements[Html_NumElements]
qreal top() const
Returns the y-coordinate of the rectangle's top edge.
int elementCount() const
Returns the number of path elements in the painter path.
qreal bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
void clipElements(const QPointF *points, const QPainterPath::ElementType *types, int count)
QT_FT_Outline * convertPath(const QPainterPath &path)
QDataBuffer< int > m_contours