28 #ifndef TMXLITE_TYPES_HPP_ 29 #define TMXLITE_TYPES_HPP_ 31 #include <tmxlite/Config.hpp> 44 Vector2(T x, T y) :x(x), y(y) {}
96 Rectangle() : left(0), top(0), width(0), height(0) {}
97 Rectangle(T l, T t, T w, T h) : left(l), top(t), width(w), height(h) {}
98 Rectangle(
Vector2<T> position,
Vector2<T> size) : left(position.x), top(position.y), width(size.x), height(size.y) {}
99 T left, top, width, height;
111 Colour(std::uint8_t red = 0, std::uint8_t green = 0, std::uint8_t blue = 0, std::uint8_t alpha = 255)
112 : r(red), g(green), b(blue), a(alpha) {}
113 std::uint8_t r, g, b, a;
117 #endif //TMXLITE_TYPES_HPP_
Two dimensional vector used to store points and positions.
Definition: Types.hpp:41
Contains the red, green, blue and alpha values of a colour in the range 0 - 255.
Definition: Types.hpp:109
Describes a rectangular area, such as an AABB (axis aligned bounding box)
Definition: Types.hpp:94