Removed sdl rect conversion.

This commit is contained in:
Relintai 2022-02-04 11:30:40 +01:00
parent e9250d185f
commit d0c80ffe6a
2 changed files with 0 additions and 33 deletions

View File

@ -110,30 +110,6 @@ void Rect2::expand_to(const Vector2 &p_vector) {
h = end.y - begin.y;
}
#ifdef SDL_AVAILABLE
SDL_Rect Rect2::as_rect() const {
SDL_Rect r;
r.x = x;
r.y = y;
r.w = w;
r.h = h;
return r;
}
SDL_FRect Rect2::as_frect() const {
SDL_FRect r;
r.x = x;
r.y = y;
r.w = w;
r.h = h;
return r;
}
#endif
Rect2 &Rect2::operator+=(const Rect2 &b) {
x += b.x;
y += b.y;

View File

@ -1,10 +1,6 @@
#ifndef RECT2_H
#define RECT2_H
#ifdef SDL_AVAILABLE
#include <SDL.h>
#endif
#include "vector2.h"
class Rect2 {
@ -22,11 +18,6 @@ public:
void expand_to(const Vector2 &p_vector);
#ifdef SDL_AVAILABLE
SDL_Rect as_rect() const;
SDL_FRect as_frect() const;
#endif
Rect2 &operator+=(const Rect2 &b);
Rect2 &operator-=(const Rect2 &b);