25#ifndef SFML_SPRITE_HPP
26#define SFML_SPRITE_HPP
91 void Resize(
float Width,
float Height);
Color is an utility class for manipulating 32-bits RGBA colors.
void Scale(float FactorX, float FactorY)
Scale the object (take 2 values).
Drawable(const Vector2f &Position=Vector2f(0, 0), const Vector2f &Scale=Vector2f(1, 1), float Rotation=0.f, const Color &Col=Color(255, 255, 255, 255))
Default constructor.
friend class RenderTarget
Image is the low-level class for loading and manipulating images.
Safe pointer to a T resource (inheriting from sf::Resource<T>), its pointer is automatically reseted ...
Color GetPixel(unsigned int X, unsigned int Y) const
Get the color of a given pixel in the sprite (point is in local coordinates).
void FlipX(bool Flipped)
Flip the sprite horizontally.
void SetImage(const Image &Img)
Change the image of the sprite.
void Resize(float Width, float Height)
Resize the sprite (by changing its scale factors) (take 2 values).
void SetSubRect(const IntRect &SubRect)
Set the sub-rectangle of the sprite inside the source image.
const Image * GetImage() const
Get the source image of the sprite.
virtual void Render(RenderTarget &Target) const
/see Drawable::Render
Sprite(const Image &Img, const Vector2f &Position=Vector2f(0, 0), const Vector2f &Scale=Vector2f(1, 1), float Rotation=0.f, const Color &Col=Color(255, 255, 255, 255))
Construct the sprite from a source image.
const IntRect & GetSubRect() const
Get the sub-rectangle of the sprite inside the source image.
void Resize(const Vector2f &Size)
Resize the sprite (by changing its scale factors) (take a 2D vector).
void FlipY(bool Flipped)
Flip the sprite vertically.
Sprite()
Default constructor.
Vector2f GetSize() const
Get the sprite size.
Vector2< float > Vector2f