#include <SFML/Config.h>#include <SFML/Graphics/BlendMode.h>#include <SFML/Graphics/Color.h>#include <SFML/Graphics/Rect.h>#include <SFML/Graphics/Types.h>Go to the source code of this file.
Enumerations | |
| enum | sfStringStyle { sfStringRegular = 0, sfStringBold = 1 << 0, sfStringItalic = 1 << 1, sfStringUnderlined = 1 << 2 } |
| sfString styles More... | |
Functions | |
| CSFML_API sfString * | sfString_Create () |
| Create a new string. | |
| CSFML_API void | sfString_Destroy (sfString *String) |
| Destroy an existing string. | |
| CSFML_API void | sfString_SetX (sfString *String, float X) |
| Set the X position of a string. | |
| CSFML_API void | sfString_SetY (sfString *String, float Y) |
| Set the Y position of a string. | |
| CSFML_API void | sfString_SetPosition (sfString *String, float Left, float Top) |
| Set the position of a string. | |
| CSFML_API void | sfString_SetScaleX (sfString *String, float Scale) |
| Set the horizontal scale of a string. | |
| CSFML_API void | sfString_SetScaleY (sfString *String, float Scale) |
| Set the vertical scale of a string. | |
| CSFML_API void | sfString_SetScale (sfString *String, float ScaleX, float ScaleY) |
| Set the scale of a string. | |
| CSFML_API void | sfString_SetRotation (sfString *String, float Rotation) |
| Set the orientation of a string. | |
| CSFML_API void | sfString_SetCenter (sfString *String, float X, float Y) |
| Set the center of a string, in coordinates relative to its left-top corner. | |
| CSFML_API void | sfString_SetColor (sfString *String, sfColor Color) |
| Set the color of a string. | |
| CSFML_API void | sfString_SetBlendMode (sfString *String, sfBlendMode Mode) |
| Set the blending mode for a string. | |
| CSFML_API float | sfString_GetX (sfString *String) |
| Get the X position of a string. | |
| CSFML_API float | sfString_GetY (sfString *String) |
| Get the top Y of a string. | |
| CSFML_API float | sfString_GetScaleX (sfString *String) |
| Get the horizontal scale of a string. | |
| CSFML_API float | sfString_GetScaleY (sfString *String) |
| Get the vertical scale of a string. | |
| CSFML_API float | sfString_GetRotation (sfString *String) |
| Get the orientation of a string. | |
| CSFML_API float | sfString_GetCenterX (sfString *String) |
| Get the X position of the center a string. | |
| CSFML_API float | sfString_GetCenterY (sfString *String) |
| Get the top Y of the center of a string. | |
| CSFML_API sfColor | sfString_GetColor (sfString *String) |
| Get the color of a string. | |
| CSFML_API sfBlendMode | sfString_GetBlendMode (sfString *String) |
| Get the current blending mode of a string. | |
| CSFML_API void | sfString_Move (sfString *String, float OffsetX, float OffsetY) |
| Move a string. | |
| CSFML_API void | sfString_Scale (sfString *String, float FactorX, float FactorY) |
| Scale a string. | |
| CSFML_API void | sfString_Rotate (sfString *String, float Angle) |
| Rotate a string. | |
| CSFML_API void | sfString_TransformToLocal (sfString *String, float PointX, float PointY, float *X, float *Y) |
| Transform a point from global coordinates into the string's local coordinates (ie it applies the inverse of object's center, translation, rotation and scale to the point). | |
| CSFML_API void | sfString_TransformToGlobal (sfString *String, float PointX, float PointY, float *X, float *Y) |
| Transform a point from the string's local coordinates into global coordinates (ie it applies the object's center, translation, rotation and scale to the point). | |
| CSFML_API void | sfString_SetText (sfString *String, const char *Text) |
| Set the text of a string (from a multibyte string). | |
| CSFML_API void | sfString_SetUnicodeText (sfString *String, const sfUint32 *Text) |
| Set the text of a string (from a unicode string). | |
| CSFML_API void | sfString_SetFont (sfString *String, sfFont *Font) |
| Set the font of a string. | |
| CSFML_API void | sfString_SetSize (sfString *String, float Size) |
| Set the size of a string. | |
| CSFML_API void | sfString_SetStyle (sfString *String, unsigned long Style) |
| Set the style of a string. | |
| CSFML_API const sfUint32 * | sfString_GetUnicodeText (sfString *String) |
| Get the text of a string (returns a unicode string). | |
| CSFML_API const char * | sfString_GetText (sfString *String) |
| Get the text of a string (returns an ANSI string). | |
| CSFML_API sfFont * | sfString_GetFont (sfString *String) |
| Get the font used by a string. | |
| CSFML_API float | sfString_GetSize (sfString *String) |
| Get the size of the characters of a string. | |
| CSFML_API unsigned long | sfString_GetStyle (sfString *String) |
| Get the style of a string. | |
| CSFML_API void | sfString_GetCharacterPos (sfString *String, size_t Index, float *X, float *Y) |
| Return the visual position of the Index-th character of the string, in coordinates relative to the string (note : translation, center, rotation and scale are not applied). | |
| CSFML_API sfFloatRect | sfString_GetRect (sfString *String) |
| Get the bounding rectangle of a string on screen. | |
| enum sfStringStyle |
| CSFML_API sfString* sfString_Create | ( | ) |
Create a new string.
| CSFML_API void sfString_Destroy | ( | sfString * | String | ) |
Destroy an existing string.
| String | : String to delete |
| CSFML_API sfBlendMode sfString_GetBlendMode | ( | sfString * | String | ) |
Get the current blending mode of a string.
| String | : String to read |
| CSFML_API float sfString_GetCenterX | ( | sfString * | String | ) |
Get the X position of the center a string.
| String | : String to read |
| CSFML_API float sfString_GetCenterY | ( | sfString * | String | ) |
Get the top Y of the center of a string.
| String | : String to read |
| CSFML_API void sfString_GetCharacterPos | ( | sfString * | String, | |
| size_t | Index, | |||
| float * | X, | |||
| float * | Y | |||
| ) |
Return the visual position of the Index-th character of the string, in coordinates relative to the string (note : translation, center, rotation and scale are not applied).
| String | : String to read | |
| Index | : Index of the character | |
| X | : Value to fill with the X coordinate of the position | |
| Y | : Value to fill with the y coordinate of the position |
Get the color of a string.
| String | : String to read |
Get the font used by a string.
| String | : String to read |
| CSFML_API sfFloatRect sfString_GetRect | ( | sfString * | String | ) |
Get the bounding rectangle of a string on screen.
| String | : String to read |
| CSFML_API float sfString_GetRotation | ( | sfString * | String | ) |
Get the orientation of a string.
| String | : String to read |
| CSFML_API float sfString_GetScaleX | ( | sfString * | String | ) |
Get the horizontal scale of a string.
| String | : String to read |
| CSFML_API float sfString_GetScaleY | ( | sfString * | String | ) |
Get the vertical scale of a string.
| String | : String to read |
| CSFML_API float sfString_GetSize | ( | sfString * | String | ) |
Get the size of the characters of a string.
| String | : String to read |
| CSFML_API unsigned long sfString_GetStyle | ( | sfString * | String | ) |
Get the style of a string.
| String | : String to read |
| CSFML_API const char* sfString_GetText | ( | sfString * | String | ) |
Get the text of a string (returns an ANSI string).
| String | : String to read |
| CSFML_API const sfUint32* sfString_GetUnicodeText | ( | sfString * | String | ) |
Get the text of a string (returns a unicode string).
| String | : String to read |
| CSFML_API float sfString_GetX | ( | sfString * | String | ) |
Get the X position of a string.
| String | : String to read |
| CSFML_API float sfString_GetY | ( | sfString * | String | ) |
Get the top Y of a string.
| String | : String to read |
| CSFML_API void sfString_Move | ( | sfString * | String, | |
| float | OffsetX, | |||
| float | OffsetY | |||
| ) |
Move a string.
| String | : String to modify | |
| OffsetX | : Offset on the X axis | |
| OffsetY | : Offset on the Y axis |
| CSFML_API void sfString_Rotate | ( | sfString * | String, | |
| float | Angle | |||
| ) |
Rotate a string.
| String | : String to modify | |
| Angle | : Angle of rotation, in degrees |
| CSFML_API void sfString_Scale | ( | sfString * | String, | |
| float | FactorX, | |||
| float | FactorY | |||
| ) |
Scale a string.
| String | : String to modify | |
| FactorX | : Horizontal scaling factor (must be strictly positive) | |
| FactorY | : Vertical scaling factor (must be strictly positive) |
| CSFML_API void sfString_SetBlendMode | ( | sfString * | String, | |
| sfBlendMode | Mode | |||
| ) |
Set the blending mode for a string.
| String | : String to modify | |
| Mode | : New blending mode |
| CSFML_API void sfString_SetCenter | ( | sfString * | String, | |
| float | X, | |||
| float | Y | |||
| ) |
Set the center of a string, in coordinates relative to its left-top corner.
| String | : String to modify | |
| X | : X coordinate of the center | |
| Y | : Y coordinate of the center |
Set the color of a string.
| String | : String to modify | |
| Color | : New color |
Set the font of a string.
| String | : String to modify | |
| Font | : Font to use |
| CSFML_API void sfString_SetPosition | ( | sfString * | String, | |
| float | Left, | |||
| float | Top | |||
| ) |
Set the position of a string.
| String | : String to modify | |
| Left | : New left coordinate | |
| Top | : New top coordinate |
| CSFML_API void sfString_SetRotation | ( | sfString * | String, | |
| float | Rotation | |||
| ) |
Set the orientation of a string.
| String | : String to modify | |
| Rotation | : Angle of rotation, in degrees |
| CSFML_API void sfString_SetScale | ( | sfString * | String, | |
| float | ScaleX, | |||
| float | ScaleY | |||
| ) |
Set the scale of a string.
| String | : String to modify | |
| ScaleX | : New horizontal scale (must be strictly positive) | |
| ScaleY | : New vertical scale (must be strictly positive) |
| CSFML_API void sfString_SetScaleX | ( | sfString * | String, | |
| float | Scale | |||
| ) |
Set the horizontal scale of a string.
| String | : String to modify | |
| Scale | : New scale (must be strictly positive) |
| CSFML_API void sfString_SetScaleY | ( | sfString * | String, | |
| float | Scale | |||
| ) |
Set the vertical scale of a string.
| String | : String to modify | |
| Scale | : New scale (must be strictly positive) |
| CSFML_API void sfString_SetSize | ( | sfString * | String, | |
| float | Size | |||
| ) |
Set the size of a string.
| String | : String to modify | |
| Size | : New size, in pixels |
| CSFML_API void sfString_SetStyle | ( | sfString * | String, | |
| unsigned long | Style | |||
| ) |
Set the style of a string.
| String | : String to modify | |
| Size | : New style (see sfStringStyle enum) |
| CSFML_API void sfString_SetText | ( | sfString * | String, | |
| const char * | Text | |||
| ) |
Set the text of a string (from a multibyte string).
| String | : String to modify | |
| Text | : New text |
| CSFML_API void sfString_SetUnicodeText | ( | sfString * | String, | |
| const sfUint32 * | Text | |||
| ) |
Set the text of a string (from a unicode string).
| String | : String to modify | |
| Text | : New text |
| CSFML_API void sfString_SetX | ( | sfString * | String, | |
| float | X | |||
| ) |
Set the X position of a string.
| String | : String to modify | |
| X | : New X coordinate |
| CSFML_API void sfString_SetY | ( | sfString * | String, | |
| float | Y | |||
| ) |
Set the Y position of a string.
| String | : String to modify | |
| Y | : New Y coordinate |
| CSFML_API void sfString_TransformToGlobal | ( | sfString * | String, | |
| float | PointX, | |||
| float | PointY, | |||
| float * | X, | |||
| float * | Y | |||
| ) |
Transform a point from the string's local coordinates into global coordinates (ie it applies the object's center, translation, rotation and scale to the point).
| String | : String object | |
| PointX | : X coordinate of the point to transform | |
| PointY | : Y coordinate of the point to transform | |
| X | : Value to fill with the X coordinate of the converted point | |
| Y | : Value to fill with the y coordinate of the converted point |
| CSFML_API void sfString_TransformToLocal | ( | sfString * | String, | |
| float | PointX, | |||
| float | PointY, | |||
| float * | X, | |||
| float * | Y | |||
| ) |
Transform a point from global coordinates into the string's local coordinates (ie it applies the inverse of object's center, translation, rotation and scale to the point).
| String | : String object | |
| PointX | : X coordinate of the point to transform | |
| PointY | : Y coordinate of the point to transform | |
| X | : Value to fill with the X coordinate of the converted point | |
| Y | : Value to fill with the y coordinate of the converted point |