#include <SFML/Config.h>
#include <SFML/Graphics/BlendMode.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Image.h>
#include <SFML/Graphics/Rect.h>
Go to the source code of this file.
Typedefs | |
typedef sfSprite | sfSprite |
sfSprite defines a sprite : texture, transformations, color, and draw on screen | |
Functions | |
CSFML_API sfSprite * | sfSprite_Create () |
Create a new sprite. | |
CSFML_API void | sfSprite_Destroy (sfSprite *Sprite) |
Destroy an existing sprite. | |
CSFML_API void | sfSprite_SetLeft (sfSprite *Sprite, float Left) |
Set the left position of a sprite. | |
CSFML_API void | sfSprite_SetTop (sfSprite *Sprite, float Top) |
Set the top position of a sprite. | |
CSFML_API void | sfSprite_SetPosition (sfSprite *Sprite, float Left, float Top) |
Set the position of a sprite. | |
CSFML_API void | sfSprite_SetScaleX (sfSprite *Sprite, float Scale) |
Set the horizontal scale of a sprite. | |
CSFML_API void | sfSprite_SetScaleY (sfSprite *Sprite, float Scale) |
Set the vertical scale of a sprite. | |
CSFML_API void | sfSprite_SetScale (sfSprite *Sprite, float ScaleX, float ScaleY) |
Set the scale of a sprite. | |
CSFML_API void | sfSprite_SetRotation (sfSprite *Sprite, float Rotation) |
Set the orientation of a sprite. | |
CSFML_API void | sfSprite_SetRotationCenter (sfSprite *Sprite, float X, float Y) |
Set the center of rotation of a sprite, in coordinates relative to it. | |
CSFML_API void | sfSprite_SetColor (sfSprite *Sprite, sfColor Color) |
Set the color of a sprite. | |
CSFML_API void | sfSprite_SetBlendMode (sfSprite *Sprite, sfBlendMode Mode) |
Set the blending mode for a sprite. | |
CSFML_API float | sfSprite_GetLeft (sfSprite *Sprite) |
Get the left position of a sprite. | |
CSFML_API float | sfSprite_GetTop (sfSprite *Sprite) |
Get the top position of a sprite. | |
CSFML_API float | sfSprite_GetScaleX (sfSprite *Sprite) |
Get the horizontal scale of a sprite. | |
CSFML_API float | sfSprite_GetScaleY (sfSprite *Sprite) |
Get the vertical scale of a sprite. | |
CSFML_API float | sfSprite_GetRotation (sfSprite *Sprite) |
Get the orientation of a sprite. | |
CSFML_API sfColor | sfSprite_GetColor (sfSprite *Sprite) |
Get the color of a sprite. | |
CSFML_API sfBlendMode | sfSprite_GetBlendMode (sfSprite *Sprite) |
Get the current blending mode of a sprite. | |
CSFML_API void | sfSprite_Move (sfSprite *Sprite, float OffsetX, float OffsetY) |
Move a sprite. | |
CSFML_API void | sfSprite_Scale (sfSprite *Sprite, float FactorX, float FactorY) |
Scale a sprite. | |
CSFML_API void | sfSprite_Rotate (sfSprite *Sprite, float Angle) |
Rotate a sprite. | |
CSFML_API void | sfSprite_SetImage (sfSprite *Sprite, sfImage *Image) |
Change the image of a sprite. | |
CSFML_API void | sfSprite_SetSubRect (sfSprite *Sprite, const sfIntRect *SubRect) |
Set the sub-rectangle of a sprite inside the source image. | |
CSFML_API void | sfSprite_Resize (sfSprite *Sprite, float Width, float Height) |
Resize a sprite (by changing its scale factors). | |
CSFML_API void | sfSprite_FlipX (sfSprite *Sprite, sfBool Flipped) |
Flip a sprite horizontally. | |
CSFML_API void | sfSprite_FlipY (sfSprite *Sprite, sfBool Flipped) |
Flip a sprite vertically. | |
CSFML_API sfImage * | sfSprite_GetImage (sfSprite *Sprite) |
Get the source image of a sprite. | |
CSFML_API sfIntRect * | sfSprite_GetSubRect (sfSprite *Sprite) |
Get the sub-rectangle of a sprite inside the source image. | |
CSFML_API float | sfSprite_GetWidth (sfSprite *Sprite) |
Get a sprite width. | |
CSFML_API float | sfSprite_GetHeight (sfSprite *Sprite) |
Get a sprite height. | |
CSFML_API sfColor | sfSprite_GetPixel (sfSprite *Sprite, unsigned int X, unsigned int Y) |
Get the color of a given pixel in a sprite. |
CSFML_API sfSprite* sfSprite_Create | ( | ) |
Create a new sprite.
CSFML_API void sfSprite_Destroy | ( | sfSprite * | Sprite | ) |
Destroy an existing sprite.
Sprite | : Sprite to delete |
Flip a sprite horizontally.
Sprite | : Sprite to modify | |
Flipped | : sfTrue to flip the sprite |
Flip a sprite vertically.
Sprite | : Sprite to modify | |
Flipped | : sfTrue to flip the sprite |
CSFML_API sfBlendMode sfSprite_GetBlendMode | ( | sfSprite * | Sprite | ) |
Get the current blending mode of a sprite.
Sprite | : Sprite to read |
Get the color of a sprite.
Sprite | : Sprite to read |
CSFML_API float sfSprite_GetHeight | ( | sfSprite * | Sprite | ) |
Get a sprite height.
Sprite | : Sprite to read |
Get the source image of a sprite.
Sprite | : Sprite to read |
CSFML_API float sfSprite_GetLeft | ( | sfSprite * | Sprite | ) |
Get the left position of a sprite.
Sprite | : Sprite to read |
Get the color of a given pixel in a sprite.
Sprite | : Sprite to read | |
X | : X coordinate of the pixel to get | |
Y | : Y coordinate of the pixel to get |
CSFML_API float sfSprite_GetRotation | ( | sfSprite * | Sprite | ) |
Get the orientation of a sprite.
Sprite | : Sprite to read |
CSFML_API float sfSprite_GetScaleX | ( | sfSprite * | Sprite | ) |
Get the horizontal scale of a sprite.
Sprite | : Sprite to read |
CSFML_API float sfSprite_GetScaleY | ( | sfSprite * | Sprite | ) |
Get the vertical scale of a sprite.
Sprite | : Sprite to read |
Get the sub-rectangle of a sprite inside the source image.
Sprite | : Sprite to read |
CSFML_API float sfSprite_GetTop | ( | sfSprite * | Sprite | ) |
Get the top position of a sprite.
Sprite | : Sprite to read |
CSFML_API float sfSprite_GetWidth | ( | sfSprite * | Sprite | ) |
Get a sprite width.
Sprite | : Sprite to read |
CSFML_API void sfSprite_Move | ( | sfSprite * | Sprite, | |
float | OffsetX, | |||
float | OffsetY | |||
) |
Move a sprite.
Sprite | : Sprite to modify | |
OffsetX | : Offset on the X axis | |
OffsetY | : Offset on the Y axis |
CSFML_API void sfSprite_Resize | ( | sfSprite * | Sprite, | |
float | Width, | |||
float | Height | |||
) |
Resize a sprite (by changing its scale factors).
Sprite | : Sprite to modify | |
Width | : New width (must be strictly positive) | |
Height | : New height (must be strictly positive) |
CSFML_API void sfSprite_Rotate | ( | sfSprite * | Sprite, | |
float | Angle | |||
) |
Rotate a sprite.
Sprite | : Sprite to modify | |
Angle | : Angle of rotation, in degrees |
CSFML_API void sfSprite_Scale | ( | sfSprite * | Sprite, | |
float | FactorX, | |||
float | FactorY | |||
) |
Scale a sprite.
Sprite | : Sprite to modify | |
FactorX | : Horizontal scaling factor (must be strictly positive) | |
FactorY | : Vertical scaling factor (must be strictly positive) |
CSFML_API void sfSprite_SetBlendMode | ( | sfSprite * | Sprite, | |
sfBlendMode | Mode | |||
) |
Set the blending mode for a sprite.
Sprite | : Sprite to modify | |
Mode | : New blending mode |
Set the color of a sprite.
Sprite | : Sprite to modify | |
Color | : New color |
Change the image of a sprite.
Sprite | : Sprite to modify | |
Image | : New image |
CSFML_API void sfSprite_SetLeft | ( | sfSprite * | Sprite, | |
float | Left | |||
) |
Set the left position of a sprite.
Sprite | : Sprite to modify | |
Left | : New left coordinate |
CSFML_API void sfSprite_SetPosition | ( | sfSprite * | Sprite, | |
float | Left, | |||
float | Top | |||
) |
Set the position of a sprite.
Sprite | : Sprite to modify | |
Left | : New left coordinate | |
Top | : New top coordinate |
CSFML_API void sfSprite_SetRotation | ( | sfSprite * | Sprite, | |
float | Rotation | |||
) |
Set the orientation of a sprite.
Sprite | : Sprite to modify | |
Rotation | : Angle of rotation, in degrees |
CSFML_API void sfSprite_SetRotationCenter | ( | sfSprite * | Sprite, | |
float | X, | |||
float | Y | |||
) |
Set the center of rotation of a sprite, in coordinates relative to it.
Sprite | : Sprite to modify | |
X | : X coordinate of the center of rotation | |
Y | : Y coordinate of the center of rotation |
CSFML_API void sfSprite_SetScale | ( | sfSprite * | Sprite, | |
float | ScaleX, | |||
float | ScaleY | |||
) |
Set the scale of a sprite.
Sprite | : Sprite to modify | |
ScaleX | : New horizontal scale (must be strictly positive) | |
ScaleY | : New vertical scale (must be strictly positive) |
CSFML_API void sfSprite_SetScaleX | ( | sfSprite * | Sprite, | |
float | Scale | |||
) |
Set the horizontal scale of a sprite.
Sprite | : Sprite to modify | |
Scale | : New scale (must be strictly positive) |
CSFML_API void sfSprite_SetScaleY | ( | sfSprite * | Sprite, | |
float | Scale | |||
) |
Set the vertical scale of a sprite.
Sprite | : Sprite to modify | |
Scale | : New scale (must be strictly positive) |
Set the sub-rectangle of a sprite inside the source image.
Sprite | : Sprite to modify | |
SubRect | : New sub-rectangle |
CSFML_API void sfSprite_SetTop | ( | sfSprite * | Sprite, | |
float | Top | |||
) |
Set the top position of a sprite.
Sprite | : Sprite to modify | |
Top | : New top coordinate |