Go to the documentation of this file. 78 #include <SFML/System/Vector2.hpp> 79 #include <SFML/Graphics/Color.hpp> 81 #define IM_VEC2_CLASS_EXTRA \ 82 template <typename T> \ 83 ImVec2(const sf::Vector2<T>& v) { \ 84 x = static_cast<float>(v.x); \ 85 y = static_cast<float>(v.y); \ 88 template <typename T> \ 89 operator sf::Vector2<T>() const { \ 90 return sf::Vector2<T>(x, y); \ 93 #define IM_VEC4_CLASS_EXTRA \ 94 ImVec4(const sf::Color & c) \ 95 : ImVec4(c.r / 255.f, c.g / 255.f, c.b / 255.f, c.a / 255.f) { \ 97 operator sf::Color() const { \ 99 static_cast<sf::Uint8>(x * 255.f), \ 100 static_cast<sf::Uint8>(y * 255.f), \ 101 static_cast<sf::Uint8>(z * 255.f), \ 102 static_cast<sf::Uint8>(w * 255.f)); \