KDEGames
kgamerenderedgraphicsobject.cpp
20 bool adjustRenderSize(); // returns whether an adjustment was made; WARNING: only call when m_primaryView != 0
27 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
38KGameRenderedGraphicsObjectPrivate::KGameRenderedGraphicsObjectPrivate(KGameRenderedGraphicsObject *parent)
77 t.scale(m_fixedSize.width() / m_correctRenderSize.width(), m_fixedSize.height() / m_correctRenderSize.height());
84KGameRenderedGraphicsObject::KGameRenderedGraphicsObject(KGameGraphicsViewRenderer *renderer, const QString &spriteKey, QGraphicsItem *parent)
215void KGameRenderedGraphicsObject::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
249void KGameRenderedGraphicsObjectPrivate::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
A QGraphicsObject which displays pixmaps from a KGameRenderer.
Definition kgamerenderedgraphicsobject.h:53
void setFixedSize(QSizeF size)
Sets the fixed size of this item, i.e.
Definition kgamerenderedgraphicsobject.cpp:124
void setPrimaryView(QGraphicsView *view)
Sets the primary view of this item.
Definition kgamerenderedgraphicsobject.cpp:141
QSizeF fixedSize() const
Definition kgamerenderedgraphicsobject.cpp:117
void setOffset(QPointF offset)
Sets the item's offset, which defines the point of the top-left corner of the bounding rect,...
Definition kgamerenderedgraphicsobject.cpp:101
QGraphicsView * primaryView() const
Returns a pointer to the current primary view, or 0 if no primary view has been set (which is the def...
Definition kgamerenderedgraphicsobject.cpp:134
KGameRenderedGraphicsObject(KGameGraphicsViewRenderer *renderer, const QString &spriteKey, QGraphicsItem *parent=nullptr)
Creates a new KGameRenderedGraphicsObject which renders the sprite with the given spriteKey as provid...
Definition kgamerenderedgraphicsobject.cpp:84
void receivePixmap(const QPixmap &pixmap) override
This method is called when the KGameRenderer has provided a new pixmap for this client (esp.
Definition kgamerenderedgraphicsobject.cpp:164
QPointF offset() const
Definition kgamerenderedgraphicsobject.cpp:94
An object that receives pixmaps from a KGameRenderer.
Definition kgamerendererclient.h:42
void setRenderSize(QSize renderSize)
Defines the size of the pixmap that will be requested from KGameRenderer.
Definition kgamerendererclient.cpp:104
void prepareGeometryChange()
QTransform sceneTransform() const const
void setTransform(const QTransform &matrix, bool combine)
void update(const QRectF &rect)
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
QPixmap pixmap() const const
QPainterPath mapFromScene(const QPainterPath &path) const const
void drawPixmap(const QPoint &point, const QPixmap &pixmap)
void restore()
void save()
void setTransform(const QTransform &transform, bool combine)
const QTransform & transform() const const
qreal x() const const
qreal y() const const
QPointF bottomLeft() const const
QPointF topLeft() const const
QPointF topRight() const const
int height() const const
void setHeight(int height)
void setWidth(int width)
int width() const const
QSizeF expandedTo(const QSizeF &otherSize) const const
qreal height() const const
qreal width() const const
bool isRotating() const const
QLine map(const QLine &l) const const
QTransform & scale(qreal sx, qreal sy)
bool isAncestorOf(const QWidget *child) const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:13:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:13:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.