CopperSpice API  1.9.1
QPainter::PixmapFragment Class Reference

A class used in conjunction with QPainter::drawPixmapFragments() to specify how a pixmap is drawn. More...

Static Public Methods

static PixmapFragment create (const QPointF &pos, const QRectF &sourceRect, qreal scaleX=1, qreal scaleY=1, qreal rotation=0, qreal opacity=1)
 

Detailed Description

This class is used in conjunction with the QPainter::drawPixmapFragments() method to specify how a pixmap or portion 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() method. The variables x, y, width and height are used to calculate the target rectangle that is drawn.

The values for x and y denote 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.

See also
QPainter::drawPixmapFragments()

Method Documentation

PixmapFragment QPainter::PixmapFragment::create ( const QPointF pos,
const QRectF sourceRect,
qreal  scaleX = 1,
qreal  scaleY = 1,
qreal  rotation = 0,
qreal  opacity = 1 
)
static

This method returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.