@@ -18,19 +18,19 @@ extern "C" void sfCircleShape_del(sf::CircleShape *shape) {
18
18
}
19
19
20
20
extern " C" void sfCircleShape_setPosition (sf::CircleShape *shape, sfVector2f position) {
21
- shape->setPosition (position.x , position.y );
21
+ shape->setPosition (sf::Vector2f ( position.x , position.y ) );
22
22
}
23
23
24
24
extern " C" void sfCircleShape_setRotation (sf::CircleShape *shape, float angle) {
25
- shape->setRotation (angle);
25
+ shape->setRotation (sf::degrees ( angle) );
26
26
}
27
27
28
28
extern " C" void sfCircleShape_setScale (sf::CircleShape *shape, sfVector2f scale) {
29
- shape->setScale (scale.x , scale.y );
29
+ shape->setScale (sf::Vector2f ( scale.x , scale.y ) );
30
30
}
31
31
32
32
extern " C" void sfCircleShape_setOrigin (sf::CircleShape *shape, sfVector2f origin) {
33
- shape->setOrigin (origin.x , origin.y );
33
+ shape->setOrigin (sf::Vector2f ( origin.x , origin.y ) );
34
34
}
35
35
36
36
extern " C" sfVector2f sfCircleShape_getPosition (const sf::CircleShape *shape) {
@@ -39,7 +39,7 @@ extern "C" sfVector2f sfCircleShape_getPosition(const sf::CircleShape *shape) {
39
39
}
40
40
41
41
extern " C" float sfCircleShape_getRotation (const sf::CircleShape *shape) {
42
- return shape->getRotation ();
42
+ return shape->getRotation (). asDegrees () ;
43
43
}
44
44
45
45
extern " C" sfVector2f sfCircleShape_getScale (const sf::CircleShape *shape) {
@@ -53,15 +53,15 @@ extern "C" sfVector2f sfCircleShape_getOrigin(const sf::CircleShape *shape) {
53
53
}
54
54
55
55
extern " C" void sfCircleShape_move (sf::CircleShape *shape, sfVector2f offset) {
56
- shape->move (offset.x , offset.y );
56
+ shape->move (sf::Vector2f ( offset.x , offset.y ) );
57
57
}
58
58
59
59
extern " C" void sfCircleShape_rotate (sf::CircleShape *shape, float angle) {
60
- shape->rotate (angle);
60
+ shape->rotate (sf::degrees ( angle) );
61
61
}
62
62
63
63
extern " C" void sfCircleShape_scale (sf::CircleShape *shape, sfVector2f factors) {
64
- shape->scale (factors.x , factors.y );
64
+ shape->scale (sf::Vector2f ( factors.x , factors.y ) );
65
65
}
66
66
67
67
extern " C" sf::Transform const *sfCircleShape_getTransform (const sf::CircleShape *shape) {
@@ -77,7 +77,7 @@ extern "C" void sfCircleShape_setTexture(sf::CircleShape *shape, const sf::Textu
77
77
}
78
78
79
79
extern " C" void sfCircleShape_setTextureRect (sf::CircleShape *shape, sfIntRect rect) {
80
- shape->setTextureRect (sf::IntRect (rect.left , rect.top , rect.width , rect.height ) );
80
+ shape->setTextureRect ({ sf::Vector2i (rect.position . x , rect.position . y ), sf::Vector2i ( rect.size . x , rect.size . y )} );
81
81
}
82
82
83
83
extern " C" void sfCircleShape_setFillColor (sf::CircleShape *shape, sfColor color) {
@@ -98,7 +98,7 @@ extern "C" const sf::Texture *sfCircleShape_getTexture(const sf::CircleShape *sh
98
98
99
99
extern " C" sfIntRect sfCircleShape_getTextureRect (const sf::CircleShape *shape) {
100
100
sf::IntRect rect = shape->getTextureRect ();
101
- return {rect.left , rect.top , rect.width , rect.height };
101
+ return {rect.position . x , rect.position . y , rect.size . x , rect.size . y };
102
102
}
103
103
104
104
extern " C" sfColor sfCircleShape_getFillColor (const sf::CircleShape *shape) {
@@ -138,10 +138,10 @@ extern "C" void sfCircleShape_setPointCount(sf::CircleShape *shape, size_t count
138
138
139
139
extern " C" sfFloatRect sfCircleShape_getLocalBounds (const sf::CircleShape *shape) {
140
140
sf::FloatRect rect = shape->getLocalBounds ();
141
- return {rect.left , rect.top , rect.width , rect.height };
141
+ return {rect.position . x , rect.position . y , rect.size . x , rect.size . y };
142
142
}
143
143
144
144
extern " C" sfFloatRect sfCircleShape_getGlobalBounds (const sf::CircleShape *shape) {
145
145
sf::FloatRect rect = shape->getGlobalBounds ();
146
- return {rect.left , rect.top , rect.width , rect.height };
146
+ return {rect.position . x , rect.position . y , rect.size . x , rect.size . y };
147
147
}
0 commit comments