|
CTurtle
|
The Sprite class represents a selection of a larger image. This class ignores color in favor of color provided by the image the sprite corresponds to. More...
#include <CTurtle.hpp>
Public Member Functions | |
| Sprite (Image &img, int outlineWidth=0, const Color &outlineColor=Color()) | |
| Sprite (Image &img, int srcX, int srcY, int srcW, int srcH, int outlineWidth=0, const Color &outlineColor=Color()) | |
| Sprite (const Sprite ©)=default | |
| AbstractDrawableObject * | copy () const override |
| Returns a pointer to a copy of this drawable object, allocated with NEW. Result must be deleted at the responsibility of the invoker. | |
| void | draw (const Transform &t, Image &imgRef) const override |
Public Member Functions inherited from cturtle::AbstractDrawableObject | |
| virtual | ~AbstractDrawableObject ()=default |
| Empty– virtual– default de-constructor. | |
Public Attributes | |
| int | srcX |
| int | srcY |
| int | srcW |
| int | srcH |
| int | drawWidth = 0 |
| int | drawHeight = 0 |
Public Attributes inherited from cturtle::AbstractDrawableObject | |
| Color | fillColor |
| Color | outlineColor |
| int | outlineWidth = 0 |
Protected Attributes | |
| Image & | spriteImg |
Additional Inherited Members | |
Protected Member Functions inherited from cturtle::AbstractDrawableObject | |
| AbstractDrawableObject ()=default | |
| Empty default constructor. | |
The Sprite class represents a selection of a larger image. This class ignores color in favor of color provided by the image the sprite corresponds to.
|
inlineoverridevirtual |
Returns a pointer to a copy of this drawable object, allocated with NEW. Result must be deleted at the responsibility of the invoker.
Implements cturtle::AbstractDrawableObject.
|
inlineoverridevirtual |
Draws this Sprite. Disregards the Color attribute in favor of sprites colors.
Transforms the set of destination points.
Implements cturtle::AbstractDrawableObject.