#include <SFML/Config.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
Go to the source code of this file.
Functions | |
CSFML_API sfView * | sfView_Create () |
Construct a default view (1000x1000). | |
CSFML_API sfView * | sfView_CreateFromRect (sfFloatRect Rect) |
Construct a view from a rectangle. | |
CSFML_API void | sfView_Destroy (sfView *View) |
Destroy an existing view. | |
CSFML_API void | sfView_SetCenter (sfView *View, float X, float Y) |
Change the center of a view. | |
CSFML_API void | sfView_SetHalfSize (sfView *View, float HalfWidth, float HalfHeight) |
Change the half-size of a view. | |
CSFML_API void | sfView_SetFromRect (sfView *View, sfFloatRect ViewRect) |
Rebuild a view from a rectangle. | |
CSFML_API float | sfView_GetCenterX (sfView *View) |
Get the X coordinate of the center of a view. | |
CSFML_API float | sfView_GetCenterY (sfView *View) |
Get the Y coordinate of the center of a view. | |
CSFML_API float | sfView_GetHalfSizeX (sfView *View) |
Get the half-width of the view. | |
CSFML_API float | sfView_GetHalfSizeY (sfView *View) |
Get the half-height of the view. | |
CSFML_API sfFloatRect | sfView_GetRect (sfView *View) |
Get the bounding rectangle of a view. | |
CSFML_API void | sfView_Move (sfView *View, float OffsetX, float OffsetY) |
Move a view. | |
CSFML_API void | sfView_Zoom (sfView *View, float Factor) |
Resize a view rectangle to simulate a zoom / unzoom effect. |
CSFML_API sfView* sfView_Create | ( | ) |
Construct a default view (1000x1000).
CSFML_API sfView* sfView_CreateFromRect | ( | sfFloatRect | Rect | ) |
Construct a view from a rectangle.
Rect | : Rectangle defining the bounds of the view |
CSFML_API void sfView_Destroy | ( | sfView * | View | ) |
Destroy an existing view.
View | : View to destroy |
CSFML_API float sfView_GetCenterX | ( | sfView * | View | ) |
Get the X coordinate of the center of a view.
View | : View to read |
CSFML_API float sfView_GetCenterY | ( | sfView * | View | ) |
Get the Y coordinate of the center of a view.
View | : View to read |
CSFML_API float sfView_GetHalfSizeX | ( | sfView * | View | ) |
Get the half-width of the view.
View | : View to read |
CSFML_API float sfView_GetHalfSizeY | ( | sfView * | View | ) |
Get the half-height of the view.
View | : View to read |
CSFML_API sfFloatRect sfView_GetRect | ( | sfView * | View | ) |
Get the bounding rectangle of a view.
View | : View to read |
CSFML_API void sfView_Move | ( | sfView * | View, | |
float | OffsetX, | |||
float | OffsetY | |||
) |
Move a view.
View | : View to move | |
OffsetX | : Offset to move the view, on X axis | |
OffsetY | : Offset to move the view, on Y axis |
CSFML_API void sfView_SetCenter | ( | sfView * | View, | |
float | X, | |||
float | Y | |||
) |
Change the center of a view.
View | : View to modify | |
X | : X coordinate of the new center | |
Y | : Y coordinate of the new center |
CSFML_API void sfView_SetFromRect | ( | sfView * | View, | |
sfFloatRect | ViewRect | |||
) |
Rebuild a view from a rectangle.
View | : View to modify | |
ViewRect | : Rectangle defining the position and size of the view |
CSFML_API void sfView_SetHalfSize | ( | sfView * | View, | |
float | HalfWidth, | |||
float | HalfHeight | |||
) |
Change the half-size of a view.
View | : View to modify | |
HalfWidth | : New half-width | |
HalfHeight | : New half-height |
CSFML_API void sfView_Zoom | ( | sfView * | View, | |
float | Factor | |||
) |
Resize a view rectangle to simulate a zoom / unzoom effect.
View | : View to zoom | |
Factor | : Zoom factor to apply, relative to the current zoom |