00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #ifndef SFML_SPRITE_HPP
00026 #define SFML_SPRITE_HPP
00027
00029
00031 #include <SFML/Graphics/Drawable.hpp>
00032 #include <SFML/Graphics/Rect.hpp>
00033
00034 class sfImage;
00035
00036
00041 class SFML_API sfSprite : public sfDrawable
00042 {
00043 public :
00044
00049 sfSprite();
00050
00062 sfSprite(const sfImage& Image, float Left = 0.f, float Top = 0.f, float Scale = 1.f, float Rotation = 0.f, const sfColor& Color = sfColor(255, 255, 255, 255));
00063
00070 void SetImage(const sfImage& Image);
00071
00078 void SetSubRect(const sfIntRect& SubRect);
00079
00086 const sfImage* GetImage() const;
00087
00094 const sfIntRect& GetSubRect() const;
00095
00102 float GetWidth() const;
00103
00110 float GetHeight() const;
00111
00121 sfColor GetPixel(unsigned int X, unsigned int Y) const;
00122
00123 protected :
00124
00129 virtual void Render(sfRenderWindow& Window);
00130
00131 private :
00132
00134
00136 const sfImage* myImage;
00137 sfIntRect mySubRect;
00138 };
00139
00140
00141 #endif // SFML_SPRITE_HPP