Qt 4.8
|
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 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) |
This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters. More... | |
Public Variables | |
qreal | height |
the height of the source rectangle and is used to calculate the height of the target rectangle. More... | |
qreal | opacity |
the opacity of the target rectangle, where 0.0 is fully transparent and 1.0 is fully opaque. More... | |
qreal | rotation |
the rotation of the target rectangle in degrees. More... | |
qreal | scaleX |
the horizontal scale of the target rectangle. More... | |
qreal | scaleY |
the vertical scale of the target rectangle. More... | |
qreal | sourceLeft |
the left coordinate of the source rectangle. More... | |
qreal | sourceTop |
the top coordinate of the source rectangle. More... | |
qreal | width |
the width of the source rectangle and is used to calculate the width of the target rectangle. More... | |
qreal | x |
the x coordinate of center point in the target rectangle. More... | |
qreal | y |
the y coordinate of the center point in the target rectangle. More... | |
This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.
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 103 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 9829 of file qpainter.cpp.
QPainter::PixmapFragment::height |
the height of the source rectangle and is used to calculate the height of the target rectangle.
Definition at line 110 of file qpainter.h.
Referenced by QEmulationPaintEngine::drawPixmapFragments(), QPaintEngineEx::drawPixmapFragments(), QGL2PaintEngineExPrivate::drawPixmapFragments(), and QPainter::drawPixmapFragments().
QPainter::PixmapFragment::opacity |
the opacity of the target rectangle, where 0.0 is fully transparent and 1.0 is fully opaque.
Definition at line 114 of file qpainter.h.
Referenced by QEmulationPaintEngine::drawPixmapFragments(), QVGPaintEngine::drawPixmapFragments(), QPaintEngineEx::drawPixmapFragments(), and QGL2PaintEngineExPrivate::drawPixmapFragments().
QPainter::PixmapFragment::rotation |
the rotation of the target rectangle in degrees.
The target rectangle is rotated after it has been scaled.
Definition at line 113 of file qpainter.h.
QPainter::PixmapFragment::scaleX |
the horizontal scale of the target rectangle.
Definition at line 111 of file qpainter.h.
Referenced by QEmulationPaintEngine::drawPixmapFragments(), QVGPaintEngine::drawPixmapFragments(), QPaintEngineEx::drawPixmapFragments(), QGL2PaintEngineExPrivate::drawPixmapFragments(), and QPainter::drawPixmapFragments().
QPainter::PixmapFragment::scaleY |
the vertical scale of the target rectangle.
Definition at line 112 of file qpainter.h.
Referenced by QEmulationPaintEngine::drawPixmapFragments(), QVGPaintEngine::drawPixmapFragments(), QPaintEngineEx::drawPixmapFragments(), QGL2PaintEngineExPrivate::drawPixmapFragments(), and QPainter::drawPixmapFragments().
QPainter::PixmapFragment::sourceLeft |
the left coordinate of the source rectangle.
Definition at line 107 of file qpainter.h.
QPainter::PixmapFragment::sourceTop |
the top coordinate of the source rectangle.
Definition at line 108 of file qpainter.h.
QPainter::PixmapFragment::width |
the width of the source rectangle and is used to calculate the width of the target rectangle.
Definition at line 109 of file qpainter.h.
Referenced by QEmulationPaintEngine::drawPixmapFragments(), QPaintEngineEx::drawPixmapFragments(), QGL2PaintEngineExPrivate::drawPixmapFragments(), and QPainter::drawPixmapFragments().
QPainter::PixmapFragment::x |
the x coordinate of center point in the target rectangle.
Definition at line 105 of file qpainter.h.
Referenced by QGL2PaintEngineExPrivate::drawPixmapFragments(), and QPainter::drawPixmapFragments().
QPainter::PixmapFragment::y |
the y coordinate of the center point in the target rectangle.
Definition at line 106 of file qpainter.h.
Referenced by QGL2PaintEngineExPrivate::drawPixmapFragments(), and QPainter::drawPixmapFragments().