diff options
Diffstat (limited to 'pacman-c++/pixmapitem.cpp')
| -rw-r--r-- | pacman-c++/pixmapitem.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pacman-c++/pixmapitem.cpp b/pacman-c++/pixmapitem.cpp index 84517c2..1ceeec1 100644 --- a/pacman-c++/pixmapitem.cpp +++ b/pacman-c++/pixmapitem.cpp | |||
| @@ -63,6 +63,13 @@ QRectF PixmapItem::boundingRect() const | |||
| 63 | return QRectF(QPointF(0, 0), size()); | 63 | return QRectF(QPointF(0, 0), size()); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | QPainterPath PixmapItem::shape() const | ||
| 67 | { | ||
| 68 | QPainterPath path; | ||
| 69 | path.addRect(boundingRect()); | ||
| 70 | return path; | ||
| 71 | } | ||
| 72 | |||
| 66 | void PixmapItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) | 73 | void PixmapItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) |
| 67 | { | 74 | { |
| 68 | painter->drawPixmap(QPoint(0, 0), m_pix, QRect(m_x, m_y, m_width, m_height)); | 75 | painter->drawPixmap(QPoint(0, 0), m_pix, QRect(m_x, m_y, m_width, m_height)); |
