![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn. More...
#include <qpainter.h>
Static Public Member Functions | |
static PixmapFragment Q_GUI_EXPORT | create (const QPointF &pos, const QRectF &sourceRect, qreal scaleX=1, qreal scaleY=1, qreal rotation=0, qreal opacity=1) |
Public Attributes | |
qreal | x |
qreal | y |
qreal | sourceLeft |
qreal | sourceTop |
qreal | width |
qreal | height |
qreal | scaleX |
qreal | scaleY |
qreal | rotation |
qreal | opacity |
This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.
\inmodule QtGui
The sourceLeft, sourceTop, width and height variables are used as a source rectangle within the pixmap passed into the QPainter::drawPixmapFragments() function. The variables x, y, width and height are used to calculate the target rectangle that is drawn. x and y denotes the center of the target rectangle. The width and height in the target rectangle is scaled by the scaleX and scaleY values. The resulting target rectangle is then rotated rotation degrees around the x, y center point.
Definition at line 64 of file qpainter.h.
|
static |
This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.
Definition at line 8122 of file qpainter.cpp.
qreal QPainter::PixmapFragment::height |
Definition at line 71 of file qpainter.h.
qreal QPainter::PixmapFragment::opacity |
Definition at line 75 of file qpainter.h.
qreal QPainter::PixmapFragment::rotation |
Definition at line 74 of file qpainter.h.
qreal QPainter::PixmapFragment::scaleX |
Definition at line 72 of file qpainter.h.
qreal QPainter::PixmapFragment::scaleY |
Definition at line 73 of file qpainter.h.
qreal QPainter::PixmapFragment::sourceLeft |
Definition at line 68 of file qpainter.h.
qreal QPainter::PixmapFragment::sourceTop |
Definition at line 69 of file qpainter.h.
qreal QPainter::PixmapFragment::width |
Definition at line 70 of file qpainter.h.
qreal QPainter::PixmapFragment::x |
Definition at line 66 of file qpainter.h.
qreal QPainter::PixmapFragment::y |
Definition at line 67 of file qpainter.h.