CSFML 3.0.0
Loading...
Searching...
No Matches
Transformable.h
Go to the documentation of this file.
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2026 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#pragma once
26
28// Headers
30#include <CSFML/Graphics/Export.h>
31
32#include <CSFML/Graphics/Transform.h>
33#include <CSFML/Graphics/Types.h>
34#include <CSFML/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(const 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);
Export.h
CSFML_GRAPHICS_API
#define CSFML_GRAPHICS_API
Definition Graphics/Export.h:42
Types.h
sfTransformable
struct sfTransformable sfTransformable
Definition Graphics/Types.h:40
Transform.h
sfTransformable_getTransform
sfTransform sfTransformable_getTransform(const sfTransformable *transformable)
Get the combined transform of a transformable.
sfTransformable_getPosition
sfVector2f sfTransformable_getPosition(const sfTransformable *transformable)
Get the position of a transformable.
sfTransformable_getInverseTransform
sfTransform sfTransformable_getInverseTransform(const sfTransformable *transformable)
Get the inverse of the combined transform of a transformable.
sfTransformable_setOrigin
void sfTransformable_setOrigin(sfTransformable *transformable, sfVector2f origin)
Set the local origin of a transformable.
sfTransformable_scale
void sfTransformable_scale(sfTransformable *transformable, sfVector2f factors)
Scale a transformable.
sfTransformable_rotate
void sfTransformable_rotate(sfTransformable *transformable, float angle)
Rotate a transformable.
sfTransformable_setRotation
void sfTransformable_setRotation(sfTransformable *transformable, float angle)
Set the orientation of a transformable.
sfTransformable_setScale
void sfTransformable_setScale(sfTransformable *transformable, sfVector2f scale)
Set the scale factors of a transformable.
sfTransformable_getRotation
float sfTransformable_getRotation(const sfTransformable *transformable)
Get the orientation of a transformable.
sfTransformable_getOrigin
sfVector2f sfTransformable_getOrigin(const sfTransformable *transformable)
Get the local origin of a transformable.
sfTransformable_destroy
void sfTransformable_destroy(const sfTransformable *transformable)
Destroy an existing transformable.
sfTransformable_setPosition
void sfTransformable_setPosition(sfTransformable *transformable, sfVector2f position)
Set the position of a transformable.
sfTransformable_move
void sfTransformable_move(sfTransformable *transformable, sfVector2f offset)
Move a transformable by a given offset.
sfTransformable_create
sfTransformable * sfTransformable_create(void)
Create a new transformable.
sfTransformable_getScale
sfVector2f sfTransformable_getScale(const sfTransformable *transformable)
Get the current scale of a transformable.
sfTransformable_copy
sfTransformable * sfTransformable_copy(const sfTransformable *transformable)
Copy an existing transformable.
Vector2.h
sfTransform
Encapsulate a 3x3 transform matrix.
Definition Transform.h:42
sfVector2f
2-component vector of floats
Definition Vector2.h:60