# QPainter Class Reference

### [com.trolltech.qt.gui package]

### Constructor

- void QPainter()

### Constructor Properties

- prototype: The QPainter prototype object
- QPaintDevice redirected(QPaintDevice device, QPoint offset)
- void restoreRedirected(QPaintDevice device)
- void setRedirected(QPaintDevice device, QPaintDevice replacement, QPoint offset)
- CompositionMode_SourceOver
- CompositionMode_DestinationOver
- CompositionMode_Clear
- CompositionMode_Source
- CompositionMode_Destination
- CompositionMode_SourceIn
- CompositionMode_DestinationIn
- CompositionMode_SourceOut
- CompositionMode_DestinationOut
- CompositionMode_SourceAtop
- CompositionMode_DestinationAtop
- CompositionMode_Xor
- CompositionMode_Plus
- CompositionMode_Multiply
- CompositionMode_Screen
- CompositionMode_Overlay
- CompositionMode_Darken
- CompositionMode_Lighten
- CompositionMode_ColorDodge
- CompositionMode_ColorBurn
- CompositionMode_HardLight
- CompositionMode_SoftLight
- CompositionMode_Difference
- CompositionMode_Exclusion
- RasterOp_SourceOrDestination
- RasterOp_SourceAndDestination
- RasterOp_SourceXorDestination
- RasterOp_NotSourceAndNotDestination
- RasterOp_NotSourceOrNotDestination
- RasterOp_NotSourceXorDestination
- RasterOp_NotSource
- RasterOp_NotSourceAndDestination
- RasterOp_SourceAndNotDestination
- CompositionMode( value )
- Antialiasing = 0x01
- TextAntialiasing = 0x02
- SmoothPixmapTransform = 0x04
- HighQualityAntialiasing = 0x08
- NonCosmeticDefaultPen = 0x10
- RenderHint( value )
- RenderHints( value1, value2, ... )
- OpaqueHint = 0x01
- PixmapFragmentHint( value )

### Prototype Object Properties

- QBrush background()
- BGMode backgroundMode()
- bool begin(QPaintDevice arg__1)
- void beginNativePainting()
- QRect boundingRect(QRect rect, int flags, String text)
- QBrush brush()
- QPoint brushOrigin()
- QRectF clipBoundingRect()
- QPainterPath clipPath()
- QRegion clipRegion()
- QMatrix combinedMatrix()
- QTransform combinedTransform()
- CompositionMode compositionMode()
- QPaintDevice device()
- QMatrix deviceMatrix()
- QTransform deviceTransform()
- void drawArc(QRect arg__1, int a, int alen)
- void drawChord(QRect arg__1, int a, int alen)
- void drawConvexPolygon(QPolygon polygon)
- void drawEllipse(QPoint center, int rx, int ry)
- void drawImage(QPoint p, QImage image)
- void drawLine(QLine line)
- void drawLines(List lines)
- void drawLinesF(List lines)
- void drawLinesFromPoints(List pointPairs)
- void drawLinesFromPointsF(List pointPairs)
- void drawPath(QPainterPath path)
- void drawPicture(QPoint p, QPicture picture)
- void drawPie(QRect arg__1, int a, int alen)
- void drawPixmap(QPoint p, QPixmap pm)
- void drawPoint(QPoint p)
- void drawPoints(QPolygon points)
- void drawPolygon(QPolygon polygon, FillRule fillRule)
- void drawPolyline(QPolygon polygon)
- void drawRect(QRect rect)
- void drawRects(List rectangles)
- void drawRectsF(List rectangles)
- void drawRoundRect(QRect r, int xround, int yround)
- void drawRoundedRect(QRect rect, qreal xRadius, qreal yRadius, SizeMode mode)
- void drawText(QPoint p, String s)
- void drawTextItem(QPoint p, QTextItem ti)
- void drawTiledPixmap(QRect arg__1, QPixmap arg__2, QPoint arg__3)
- bool end()
- void endNativePainting()
- void eraseRect(QRect arg__1)
- void fillPath(QPainterPath path, QBrush brush)
- void fillRect(QRect arg__1, QBrush arg__2)
- QFont font()
- bool hasClipping()
- void initFrom(QWidget widget)
- bool isActive()
- LayoutDirection layoutDirection()
- qreal opacity()
- QPaintEngine paintEngine()
- QPen pen()
- RenderHints renderHints()
- void resetMatrix()
- void resetTransform()
- void restore()
- void rotate(qreal a)
- void save()
- void scale(qreal sx, qreal sy)
- void setBackground(QBrush bg)
- void setBackgroundMode(BGMode mode)
- void setBrush(BrushStyle style)
- void setBrushOrigin(QPoint arg__1)
- void setClipPath(QPainterPath path, ClipOperation op)
- void setClipRect(QRect arg__1, ClipOperation op)
- void setClipRegion(QRegion arg__1, ClipOperation op)
- void setClipping(bool enable)
- void setCompositionMode(CompositionMode mode)
- void setFont(QFont f)
- void setLayoutDirection(LayoutDirection direction)
- void setOpacity(qreal opacity)
- void setPen(PenStyle style)
- void setRenderHint(RenderHint hint, bool on)
- void setRenderHints(RenderHints hints, bool on)
- void setTransform(QTransform transform, bool combine)
- void setViewTransformEnabled(bool enable)
- void setViewport(QRect viewport)
- void setWindow(QRect window)
- void setWorldMatrix(QMatrix matrix, bool combine)
- void setWorldMatrixEnabled(bool enabled)
- void setWorldTransform(QTransform matrix, bool combine)
- void shear(qreal sh, qreal sv)
- void strokePath(QPainterPath path, QPen pen)
- bool testRenderHint(RenderHint hint)
- QTransform transform()
- void translate(QPoint offset)
- bool viewTransformEnabled()
- QRect viewport()
- QRect window()
- QMatrix worldMatrix()
- bool worldMatrixEnabled()
- QTransform worldTransform()

### Instance Properties

QPainter objects have no special properties beyond those inherited from the QPainter prototype object.