1407 #ifdef QPAINTBUFFER_DEBUG_DRAW 1408 qDebug() <<
" -> Cmd_Save";
1414 #ifdef QPAINTBUFFER_DEBUG_DRAW 1415 qDebug() <<
" -> Cmd_Restore";
1422 #ifdef QPAINTBUFFER_DEBUG_DRAW 1423 qDebug() <<
" -> Cmd_SetPen: " << pen;
1430 #ifdef QPAINTBUFFER_DEBUG_DRAW 1431 qDebug() <<
" -> Cmd_SetBrush: " << brush;
1437 #ifdef QPAINTBUFFER_DEBUG_DRAW 1445 #ifdef QPAINTBUFFER_DEBUG_DRAW 1446 qDebug() <<
" -> Cmd_SetTransform, offset: " << cmd.
offset << xform;
1453 #ifdef QPAINTBUFFER_DEBUG_DRAW 1454 qDebug() <<
" -> Cmd_Translate, offset: " << cmd.
offset << delta;
1462 #ifdef QPAINTBUFFER_DEBUG_DRAW
1463 qDebug() <<
" -> Cmd_SetCompositionMode, mode: " << mode;
1469 #ifdef QPAINTBUFFER_DEBUG_DRAW 1470 qDebug() <<
" -> Cmd_SetRenderHints, hints: " << cmd.
extra;
1473 QPainter::RenderHints nh = (QPainter::RenderHints) cmd.
extra;
1474 QPainter::RenderHints xored = ph ^ nh;
1478 painter->
setRenderHint(QPainter::HighQualityAntialiasing, nh & QPainter::HighQualityAntialiasing);
1488 #ifdef QPAINTBUFFER_DEBUG_DRAW 1495 #ifdef QPAINTBUFFER_DEBUG_DRAW 1496 qDebug() <<
" -> Cmd_SetBackgroundMode: " << cmd.
extra;
1502 #ifdef QPAINTBUFFER_DEBUG_DRAW 1503 qDebug() <<
" -> Cmd_DrawVectorPath: size: " << cmd.
size 1513 #ifdef QPAINTBUFFER_DEBUG_DRAW 1514 qDebug() <<
" -> Cmd_StrokeVectorPath: size: " << cmd.
size 1524 #ifdef QPAINTBUFFER_DEBUG_DRAW 1525 qDebug() <<
" -> Cmd_FillVectorPath: size: " << cmd.
size 1534 #ifdef QPAINTBUFFER_DEBUG_DRAW 1535 qDebug() <<
" -> Cmd_DrawPolygonF, offset: " << cmd.
offset <<
" size: " << cmd.
size 1536 <<
" mode: " << cmd.
extra 1546 #ifdef QPAINTBUFFER_DEBUG_DRAW 1547 qDebug() <<
" -> Cmd_DrawPolygonI, offset: " << cmd.
offset <<
" size: " << cmd.
size 1548 <<
" mode: " << cmd.
extra 1558 #ifdef QPAINTBUFFER_DEBUG_DRAW 1559 qDebug() <<
" -> Cmd_DrawPolylineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1565 #ifdef QPAINTBUFFER_DEBUG_DRAW 1566 qDebug() <<
" -> Cmd_DrawPolylineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1572 #ifdef QPAINTBUFFER_DEBUG_DRAW 1573 qDebug() <<
" -> Cmd_DrawConvexPolygonF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1579 #ifdef QPAINTBUFFER_DEBUG_DRAW 1580 qDebug() <<
" -> Cmd_DrawConvexPolygonI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1586 #ifdef QPAINTBUFFER_DEBUG_DRAW 1587 qDebug() <<
" -> Cmd_DrawEllipseF, offset: " << cmd.
offset;
1593 #ifdef QPAINTBUFFER_DEBUG_DRAW 1594 qDebug() <<
" -> Cmd_DrawEllipseI, offset: " << cmd.
offset;
1600 #ifdef QPAINTBUFFER_DEBUG_DRAW 1601 qDebug() <<
" -> Cmd_DrawLineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1607 #ifdef QPAINTBUFFER_DEBUG_DRAW 1608 qDebug() <<
" -> Cmd_DrawLineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1614 #ifdef QPAINTBUFFER_DEBUG_DRAW 1615 qDebug() <<
" -> Cmd_DrawPointsF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1621 #ifdef QPAINTBUFFER_DEBUG_DRAW 1622 qDebug() <<
" -> Cmd_DrawPointsI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1634 #ifdef QPAINTBUFFER_DEBUG_DRAW 1635 qDebug() <<
" -> Cmd_DrawPixmapRect:" << r << sr;
1643 #ifdef QPAINTBUFFER_DEBUG_DRAW 1644 qDebug() <<
" -> Cmd_DrawPixmapPos:" << pos;
1655 #ifdef QPAINTBUFFER_DEBUG_DRAW 1656 qDebug() <<
" -> Cmd_DrawTiledPixmap:" << r << offset;
1667 #ifdef QPAINTBUFFER_DEBUG_DRAW 1668 qDebug() <<
" -> Cmd_DrawImageRect:" << r << sr;
1676 #ifdef QPAINTBUFFER_DEBUG_DRAW 1677 qDebug() <<
" -> Cmd_DrawImagePos:" << pos;
1683 #ifdef QPAINTBUFFER_DEBUG_DRAW 1684 qDebug() <<
" -> Cmd_DrawRectF, offset: " << cmd.
offset;
1690 #ifdef QPAINTBUFFER_DEBUG_DRAW 1691 qDebug() <<
" -> Cmd_DrawRectI, offset: " << cmd.
offset;
1699 #ifdef QPAINTBUFFER_DEBUG_DRAW 1700 qDebug() <<
" -> Cmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" brush: " << brush;
1708 #ifdef QPAINTBUFFER_DEBUG_DRAW 1709 qDebug() <<
" -> Cmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" color: " << color;
1716 #ifdef QPAINTBUFFER_DEBUG_DRAW 1717 qDebug() <<
" -> Cmd_SetClipEnabled:" << clipEnabled;
1724 #ifdef QPAINTBUFFER_DEBUG_DRAW 1725 qDebug() <<
" -> Cmd_ClipVectorPath:" << path().elementCount();
1734 #ifdef QPAINTBUFFER_DEBUG_DRAW 1735 qDebug() <<
" -> Cmd_ClipRect:" << rect << cmd.
extra;
1742 #ifdef QPAINTBUFFER_DEBUG_DRAW 1743 qDebug() <<
" -> Cmd_ClipRegion:" << region.boundingRect() << cmd.
extra;
1748 #if !defined(QT_NO_RAWFONT) 1758 for (
int i=0; i<(variants.size() - 1) / 2; ++i) {
1759 glyphIndexes.append(variants.at(i*2 + 1).toUInt());
1760 positions.
append(variants.at(i*2 + 2).toPointF());
1804 qreal justificationWidth = 0;
1809 #ifdef QPAINTBUFFER_DEBUG_DRAW 1810 qDebug() <<
" -> Cmd_DrawTextItem:" << pos <<
" " <<
text <<
" " << scaleFactor;
1813 if (scaleFactor != 1.0) {
1818 font =
QFont(fnt, &fake);
1823 if (justificationWidth > 0) {
1824 size.setWidth(justificationWidth);
1830 QPointF pt(pos.x(), pos.y() - fm.ascent());
1837 #ifdef QPAINTBUFFER_DEBUG_DRAW 1838 qDebug() <<
" -> Cmd_SystemStateChanged:" << systemClip;
void setTransform(const QTransform &transform, bool combine=false)
Sets the world transformation matrix.
void setBackgroundMode(Qt::BGMode mode)
Sets the background mode of the painter to the given mode.
The QColor class provides colors based on RGB, HSV or CMYK values.
void drawPath(const QPainterPath &path)
Draws the given painter path using the current pen for outline and the current brush for filling...
The QFontMetrics class provides font metrics information.
QPointF toPointF() const
Returns the variant as a QPointF if the variant has type() Point or PointF ; otherwise returns a null...
CompositionMode
Defines the modes supported for digital image compositing.
The QLine class provides a two-dimensional vector using integer precision.
void drawPoints(const QPointF *points, int pointCount)
Draws the first pointCount points in the array points using the current pen's color.
void setUnderline(bool)
If enable is true, sets underline on; otherwise sets underline off.
Q_GUI_EXPORT int qt_defaultDpiY()
void setPositions(const QVector< QPointF > &positions)
Sets the positions of the edge of the baseline for each glyph in this set of glyph indexes to positio...
void setClipRect(const QRectF &, Qt::ClipOperation op=Qt::ReplaceClip)
Enables clipping, and sets the clip region to the given rectangle using the given clip operation...
Q_GUI_EXPORT int qt_defaultDpiX()
The QPointF class defines a point in the plane using floating point precision.
void qt_format_text(const QFont &font, const QRectF &_r, int tf, const QTextOption *option, const QString &str, QRectF *brect, int tabstops, int *tabarray, int tabarraylen, QPainter *painter)
static QRawFontPrivate * get(const QRawFont &font)
void restore()
Restores the current painter state (pops a saved state off the stack).
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
static QFontPrivate * get(const QFont &font)
bool ref()
Atomically increments the value of this QAtomicInt.
The QString class provides a Unicode character string.
QString text() const
Returns the text that should be drawn.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void setBrushOrigin(int x, int y)
Sets the brush's origin to point (x, y).
The QSizeF class defines the size of a two-dimensional object using floating point precision...
void save()
Saves the current painter state (pushes the state onto a stack).
The QLineF class provides a two-dimensional vector using floating point precision.
Q_CORE_EXPORT void qDebug(const char *,...)
void drawText(const QPointF &p, const QString &s)
Draws the given text with the currently defined text direction, beginning at the given position...
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint...
void drawRects(const QRectF *rects, int rectCount)
Draws the first rectCount of the given rectangles using the current pen and brush.
void drawEllipse(const QRectF &r)
Draws the ellipse defined by the given rectangle.
The QRectF class defines a rectangle in the plane using floating point precision. ...
void drawLines(const QLineF *lines, int lineCount)
Draws the first lineCount lines in the array lines using the current pen.
void fillPath(const QPainterPath &path, const QBrush &brush)
Fills the given path using the given brush.
void drawConvexPolygon(const QPointF *points, int pointCount)
Draws the convex polygon defined by the first pointCount points in the array points using the current...
static const QCssKnownValue positions[NumKnownPositionModes - 1]
void setStrikeOut(bool)
If enable is true, sets strikeout on; otherwise sets strikeout off.
void append(const T &t)
Inserts value at the end of the vector.
The QImage class provides a hardware-independent image representation that allows direct access to th...
void drawGlyphRun(const QPointF &position, const QGlyphRun &glyphRun)
Draws the specified glyphs at the given position.
QPaintEngine * paintEngine() const
Returns the paint engine that the painter is currently operating on if the painter is active; otherwi...
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule=Qt::OddEvenFill)
Draws the polygon defined by the first pointCount points in the array points using the current pen an...
The QRegion class specifies a clip region for a painter.
The QGlyphRun class provides direct access to the internal glyphs in a font.
void setSystemClip(const QRegion &baseClip)
Sets the system clip for this engine.
void strokePath(const QPainterPath &path, const QPen &pen)
Draws the outline (strokes) the path path with the pen specified by pen.
virtual void systemStateChanged()
const T & at(int i) const
Returns the item at index position i in the vector.
QFontEngine * engineForScript(int script) const
void drawTiledPixmap(const QRectF &rect, const QPixmap &pm, const QPointF &offset=QPointF())
Draws a tiled pixmap, inside the given rectangle with its origin at the given position.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QScopedPointer< QPaintEnginePrivate > d_ptr
void setClipRegion(const QRegion &, Qt::ClipOperation op=Qt::ReplaceClip)
Sets the clip region to the given region using the specified clip operation.
void setCompositionMode(CompositionMode mode)
Sets the composition mode to the given mode.
The QRawFont class provides access to a single physical instance of a font.
void setClipping(bool enable)
Enables clipping if enable is true, or disables clipping if enable is false.
The QFont class specifies a font used for drawing text.
void setOverline(bool)
If enable is true, sets overline on; otherwise sets overline off.
The QPoint class defines a point in the plane using integer precision.
QExplicitlySharedDataPointer< QFontPrivate > d
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
T qvariant_cast(const QVariant &)
double toDouble(bool *ok=0) const
Returns the variant as a double if the variant has type() Double , QMetaType::Float ...
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
The QPixmap class is an off-screen image representation that can be used as a paint device...
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device...
void setFont(const QFont &f)
Sets the painter's font to the given font.
RenderHints renderHints() const
Returns a flag that specifies the rendering hints that are set for this painter.
void setClipPath(const QPainterPath &path, Qt::ClipOperation op=Qt::ReplaceClip)
Enables clipping, and sets the clip path for the painter to the given path, with the clip operation...
const T * constData() const
Returns a const pointer to the data stored in the vector.
void setOpacity(qreal opacity)
Sets the opacity of the painter to opacity.
T value() const
Returns the stored value converted to the template type T.
void drawPolyline(const QPointF *points, int pointCount)
Draws the polyline defined by the first pointCount points in points using the current pen...
QTransform m_world_matrix
QFont font() const
Returns the font that should be used to draw the text.
QVector< QVariant > variants
Q_DECL_CONSTEXPR int qRound(qreal d)
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
void setGlyphIndexes(const QVector< quint32 > &glyphIndexes)
Set the glyph indexes for this QGlyphRun object to glyphIndexes.
void setRawFont(const QRawFont &rawFont)
Sets the font specified by rawFont to be the font used to look up the glyph indexes.
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.