CanvasPixmap Class Reference
#include <canvaspixmap.h>
List of all members.
|
Public Types |
enum | eRotate { none,
anti90,
anti180,
anti270
} |
Public Member Functions |
| CanvasPixmap (QCanvas *canvas) |
| ~CanvasPixmap () |
virtual bool | collidesWith (const QCanvasItem *other) const |
virtual void | draw (QPainter &painter) |
virtual QRect | boundingRect () const |
virtual bool | collidesWith (const QCanvasSprite *, const QCanvasPolygonalItem *, const QCanvasRectangle *, const QCanvasEllipse *, const QCanvasText *) const |
virtual int | rtti () const |
void | flipH (void) |
void | flipV (void) |
int | width (void) |
int | height (void) |
void | rotate (void) |
void | setRotation (eRotate orthoAngle) |
eRotate | rotation (void) |
QPixmap * | pixmap (void) |
void | setPixmap (QPixmap *_pm) |
Protected Member Functions |
virtual void | drawTransformed (QPainter &painter) |
virtual void | drawUntransformed (QPainter &painter) |
Protected Attributes |
eRotate | orthoAngle |
bool | bFlippedX |
bool | bFlippedY |
Static Protected Attributes |
static QWMatrix | wmFlipH = QWMatrix ( -1, 0, 0, 1, 0, 0 ) |
static QWMatrix | wmFlipV = QWMatrix ( 1, 0, 0, -1, 0, 0 ) |
static QWMatrix | wmOrtho [4] |
Detailed Description
A ScheditItem object to display a transparent monochrome bitmap which may be rotated in 90 deg increments or flipped horizontally and vertically
- Author:
- James Fuller,,, <james>
Constructor & Destructor Documentation
CanvasPixmap::CanvasPixmap |
( |
QCanvas * |
canvas |
) |
|
Creator
- Parameters:
-
| canvas | Where the object is represented |
CanvasPixmap::~CanvasPixmap |
( |
|
) |
|
Member Function Documentation
QRect CanvasPixmap::boundingRect |
( |
|
) |
const [virtual] |
Returns the bounding rectangle of the object
- Returns:
- QRect
bool CanvasPixmap::collidesWith |
( |
const QCanvasSprite * |
cs, |
|
|
const QCanvasPolygonalItem * |
pi, |
|
|
const QCanvasRectangle * |
cr, |
|
|
const QCanvasEllipse * |
ce, |
|
|
const QCanvasText * |
ct | |
|
) |
| | const [virtual] |
Determines if this object overlaps another QCanvasItem object
- Parameters:
-
| cs | QCanvasSprite object to check for overlap |
| pi | QCanvasPolygonalItem object to check for overlap |
| cr | QCanvasRectangle object to check for overlap |
| ce | QCanvasEllipse object to check for overlap |
| ct | QCanvasText object to check for overlap |
- Returns:
- True if any specified object overlaps with this object
bool CanvasPixmap::collidesWith |
( |
const QCanvasItem * |
other |
) |
const [virtual] |
Determines if this object overlaps another QCanvasItem object
- Parameters:
-
- Returns:
- True if an overlap is detected
void CanvasPixmap::draw |
( |
QPainter & |
painter |
) |
[virtual] |
Draw the object onto the canvas
- Parameters:
-
void CanvasPixmap::drawTransformed |
( |
QPainter & |
painter |
) |
[protected, virtual] |
Stub to perform additional drawing before rotation
- Parameters:
-
Reimplemented in ScheditBitmap.
void CanvasPixmap::drawUntransformed |
( |
QPainter & |
painter |
) |
[protected, virtual] |
Stub to perform additional drawing after rotation
- Parameters:
-
Reimplemented in ScheditBitmap.
void CanvasPixmap::flipH |
( |
void |
|
) |
|
Cause the pixmap to be flipped horizontally
- Parameters:
-
void CanvasPixmap::flipV |
( |
void |
|
) |
|
Cause the pixmap to be flipped vertically
- Parameters:
-
int CanvasPixmap::height |
( |
void |
|
) |
|
Returns the height of the bitmap
- Parameters:
-
- Returns:
- Pixel count
QPixmap * CanvasPixmap::pixmap |
( |
void |
|
) |
|
Returns a pointer to the internal QPixmap object
- Parameters:
-
- Returns:
- Pointer to QPixmap object
void CanvasPixmap::rotate |
( |
void |
|
) |
|
Cause the pixmap to be rotated as previously specified
- Parameters:
-
CanvasPixmap::eRotate CanvasPixmap::rotation |
( |
void |
|
) |
|
Return how far the pixmap is rotated (in 90 deg units)
- Parameters:
-
- Returns:
- Number of 90 deg steps
int CanvasPixmap::rtti |
( |
void |
|
) |
const [virtual] |
Unique representation of class derived from ScheditItem
- Parameters:
-
- Returns:
- int
Reimplemented in ScheditBitmap.
void CanvasPixmap::setPixmap |
( |
QPixmap * |
_pm |
) |
|
Set the QPixmap object that is to be displayed
- Parameters:
-
| _pm | QPixmap object to display |
void CanvasPixmap::setRotation |
( |
eRotate |
_orthoAngle |
) |
|
Specifies the rotation of the pixmap (in 90 deg units)
- Parameters:
-
| _orthoAngle | Number of 90 deg steps |
int CanvasPixmap::width |
( |
void |
|
) |
|
Returns the width of the object
- Parameters:
-
- Returns:
- Pixel count
Member Data Documentation
QWMatrix CanvasPixmap::wmOrtho [static, protected] |
Initial value:
{ QWMatrix ( 1, 0, 0, 1, 0, 0 ),
QWMatrix ( 0, -1, 1, 0, 0, 0 ),
QWMatrix ( -1, 0, 0, -1, 0, 0 ),
QWMatrix ( 0, 1, -1, 0, 0, 0 ) }
The documentation for this class was generated from the following files: