CSFML - C binding of the Simple and Fast Multimedia Library

CSFML

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

Transformable.h
1 //
3 // SFML - Simple and Fast Multimedia Library
4 // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24
25 #ifndef SFML_TRANSFORMABLE_H
26 #define SFML_TRANSFORMABLE_H
27
29 // Headers
31 #include <SFML/Graphics/Export.h>
32 #include <SFML/Graphics/Types.h>
33 #include <SFML/Graphics/Transform.h>
34 #include <SFML/System/Vector2.h>
35
36
43 CSFML_GRAPHICS_API sfTransformable* sfTransformable_create(void);
44
53 CSFML_GRAPHICS_API sfTransformable* sfTransformable_copy(const sfTransformable* transformable);
54
61 CSFML_GRAPHICS_API void sfTransformable_destroy(sfTransformable* transformable);
62
74 CSFML_GRAPHICS_API void sfTransformable_setPosition(sfTransformable* transformable, sfVector2f position);
75
87 CSFML_GRAPHICS_API void sfTransformable_setRotation(sfTransformable* transformable, float angle);
88
100 CSFML_GRAPHICS_API void sfTransformable_setScale(sfTransformable* transformable, sfVector2f scale);
101
116 CSFML_GRAPHICS_API void sfTransformable_setOrigin(sfTransformable* transformable, sfVector2f origin);
117
126 CSFML_GRAPHICS_API sfVector2f sfTransformable_getPosition(const sfTransformable* transformable);
127
138 CSFML_GRAPHICS_API float sfTransformable_getRotation(const sfTransformable* transformable);
139
148 CSFML_GRAPHICS_API sfVector2f sfTransformable_getScale(const sfTransformable* transformable);
149
158 CSFML_GRAPHICS_API sfVector2f sfTransformable_getOrigin(const sfTransformable* transformable);
159
170 CSFML_GRAPHICS_API void sfTransformable_move(sfTransformable* transformable, sfVector2f offset);
171
182 CSFML_GRAPHICS_API void sfTransformable_rotate(sfTransformable* transformable, float angle);
183
194 CSFML_GRAPHICS_API void sfTransformable_scale(sfTransformable* transformable, sfVector2f factors);
195
204 CSFML_GRAPHICS_API sfTransform sfTransformable_getTransform(const sfTransformable* transformable);
205
214 CSFML_GRAPHICS_API sfTransform sfTransformable_getInverseTransform(const sfTransformable* transformable);
215
216
217 #endif // SFML_TRANSFORMABLE_H
sfTransform
Encapsulate a 3x3 transform matrix.
Definition: Transform.h:42
sfVector2f
2-component vector of floats
Definition: Vector2.h:60