CSFML - C binding of the Simple and Fast Multimedia Library

CSFML

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

Transformable.h
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2023 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
43CSFML_GRAPHICS_API sfTransformable* sfTransformable_create(void);
44
53CSFML_GRAPHICS_API sfTransformable* sfTransformable_copy(const sfTransformable* transformable);
54
61CSFML_GRAPHICS_API void sfTransformable_destroy(sfTransformable* transformable);
62
74CSFML_GRAPHICS_API void sfTransformable_setPosition(sfTransformable* transformable, sfVector2f position);
75
87CSFML_GRAPHICS_API void sfTransformable_setRotation(sfTransformable* transformable, float angle);
88
100CSFML_GRAPHICS_API void sfTransformable_setScale(sfTransformable* transformable, sfVector2f scale);
101
116CSFML_GRAPHICS_API void sfTransformable_setOrigin(sfTransformable* transformable, sfVector2f origin);
117
126CSFML_GRAPHICS_API sfVector2f sfTransformable_getPosition(const sfTransformable* transformable);
127
138CSFML_GRAPHICS_API float sfTransformable_getRotation(const sfTransformable* transformable);
139
148CSFML_GRAPHICS_API sfVector2f sfTransformable_getScale(const sfTransformable* transformable);
149
158CSFML_GRAPHICS_API sfVector2f sfTransformable_getOrigin(const sfTransformable* transformable);
159
170CSFML_GRAPHICS_API void sfTransformable_move(sfTransformable* transformable, sfVector2f offset);
171
182CSFML_GRAPHICS_API void sfTransformable_rotate(sfTransformable* transformable, float angle);
183
194CSFML_GRAPHICS_API void sfTransformable_scale(sfTransformable* transformable, sfVector2f factors);
195
204CSFML_GRAPHICS_API sfTransform sfTransformable_getTransform(const sfTransformable* transformable);
205
214CSFML_GRAPHICS_API sfTransform sfTransformable_getInverseTransform(const sfTransformable* transformable);
215
216
217#endif // SFML_TRANSFORMABLE_H
sfTransform
Encapsulate a 3x3 transform matrix.
Definition Transform.h:43
sfVector2f
2-component vector of floats
Definition Vector2.h:61