Sprite.h

Go to the documentation of this file.
00001 
00002 //
00003 // SFML - Simple and Fast Multimedia Library
00004 // Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
00005 //
00006 // This software is provided 'as-is', without any express or implied warranty.
00007 // In no event will the authors be held liable for any damages arising from the use of this software.
00008 //
00009 // Permission is granted to anyone to use this software for any purpose,
00010 // including commercial applications, and to alter it and redistribute it freely,
00011 // subject to the following restrictions:
00012 //
00013 // 1. The origin of this software must not be misrepresented;
00014 //    you must not claim that you wrote the original software.
00015 //    If you use this software in a product, an acknowledgment
00016 //    in the product documentation would be appreciated but is not required.
00017 //
00018 // 2. Altered source versions must be plainly marked as such,
00019 //    and must not be misrepresented as being the original software.
00020 //
00021 // 3. This notice may not be removed or altered from any source distribution.
00022 //
00024 
00025 #ifndef SFML_SPRITE_H
00026 #define SFML_SPRITE_H
00027 
00029 // Headers
00031 #include <SFML/Config.h>
00032 #include <SFML/Graphics/BlendMode.h>
00033 #include <SFML/Graphics/Color.h>
00034 #include <SFML/Graphics/Image.h>
00035 #include <SFML/Graphics/Rect.h>
00036 
00037 
00042 typedef struct sfSprite sfSprite;
00043 
00044 
00051 CSFML_API sfSprite* sfSprite_Create();
00052 
00059 CSFML_API void sfSprite_Destroy(sfSprite* Sprite);
00060 
00068 CSFML_API void sfSprite_SetX(sfSprite* Sprite, float X);
00069 
00077 CSFML_API void sfSprite_SetY(sfSprite* Sprite, float Y);
00078 
00087 CSFML_API void sfSprite_SetPosition(sfSprite* Sprite, float X, float Y);
00088 
00096 CSFML_API void sfSprite_SetScaleX(sfSprite* Sprite, float Scale);
00097 
00105 CSFML_API void sfSprite_SetScaleY(sfSprite* Sprite, float Scale);
00106 
00115 CSFML_API void sfSprite_SetScale(sfSprite* Sprite, float ScaleX, float ScaleY);
00116 
00124 CSFML_API void sfSprite_SetRotation(sfSprite* Sprite, float Rotation);
00125 
00135 CSFML_API void sfSprite_SetCenter(sfSprite* Sprite, float X, float Y);
00136 
00144 CSFML_API void sfSprite_SetColor(sfSprite* Sprite, sfColor Color);
00145 
00153 CSFML_API void sfSprite_SetBlendMode(sfSprite* Sprite, sfBlendMode Mode);
00154 
00163 CSFML_API float sfSprite_GetX(sfSprite* Sprite);
00164 
00173 CSFML_API float sfSprite_GetY(sfSprite* Sprite);
00174 
00183 CSFML_API float sfSprite_GetScaleX(sfSprite* Sprite);
00184 
00193 CSFML_API float sfSprite_GetScaleY(sfSprite* Sprite);
00194 
00203 CSFML_API float sfSprite_GetRotation(sfSprite* Sprite);
00204 
00213 CSFML_API float sfSprite_GetCenterX(sfSprite* Sprite);
00214 
00223 CSFML_API float sfSprite_GetCenterY(sfSprite* Sprite);
00224 
00233 CSFML_API sfColor sfSprite_GetColor(sfSprite* Sprite);
00234 
00243 CSFML_API sfBlendMode sfSprite_GetBlendMode(sfSprite* Sprite);
00244 
00253 CSFML_API void sfSprite_Move(sfSprite* Sprite, float OffsetX, float OffsetY);
00254 
00263 CSFML_API void sfSprite_Scale(sfSprite* Sprite, float FactorX, float FactorY);
00264 
00272 CSFML_API void sfSprite_Rotate(sfSprite* Sprite, float Angle);
00273 
00281 CSFML_API void sfSprite_SetImage(sfSprite* Sprite, sfImage* Image);
00282 
00290 CSFML_API void sfSprite_SetSubRect(sfSprite* Sprite, const sfIntRect* SubRect);
00291 
00300 CSFML_API void sfSprite_Resize(sfSprite* Sprite, float Width, float Height);
00301 
00309 CSFML_API void sfSprite_FlipX(sfSprite* Sprite, sfBool Flipped);
00310 
00318 CSFML_API void sfSprite_FlipY(sfSprite* Sprite, sfBool Flipped);
00319 
00328 CSFML_API sfImage* sfSprite_GetImage(sfSprite* Sprite);
00329 
00338 CSFML_API sfIntRect* sfSprite_GetSubRect(sfSprite* Sprite);
00339 
00348 CSFML_API float sfSprite_GetWidth(sfSprite* Sprite);
00349 
00358 CSFML_API float sfSprite_GetHeight(sfSprite* Sprite);
00359 
00370 CSFML_API sfColor sfSprite_GetPixel(sfSprite* Sprite, unsigned int X, unsigned int Y);
00371 
00372 
00373 #endif // SFML_SPRITE_H