Move sf::Rect
printer to GraphicsUtil
This commit is contained in:
parent
9b3735c05f
commit
bc7ec1277a
@ -8,6 +8,8 @@
|
||||
|
||||
#include "WindowUtil.hpp"
|
||||
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
|
||||
namespace sf
|
||||
{
|
||||
struct BlendMode;
|
||||
@ -17,6 +19,13 @@ namespace sf
|
||||
std::ostream& operator <<(std::ostream& os, const BlendMode& blendMode);
|
||||
std::ostream& operator <<(std::ostream& os, const Color& color);
|
||||
std::ostream& operator <<(std::ostream& os, const Transform& transform);
|
||||
|
||||
template <typename T>
|
||||
std::ostream& operator <<(std::ostream& os, const sf::Rect<T>& rect)
|
||||
{
|
||||
os << "(left=" << rect.left << ", top=" << rect.top << ", width=" << rect.width << ", height=" << rect.height << ")";
|
||||
return os;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SFML_TESTUTILITIES_GRAPHICS_HPP
|
||||
|
@ -8,21 +8,12 @@
|
||||
|
||||
#include "SystemUtil.hpp"
|
||||
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
|
||||
// String conversions for doctest framework
|
||||
namespace sf
|
||||
{
|
||||
class VideoMode;
|
||||
|
||||
std::ostream& operator <<(std::ostream& os, const sf::VideoMode& videoMode);
|
||||
|
||||
template <typename T>
|
||||
std::ostream& operator <<(std::ostream& os, const sf::Rect<T>& rect)
|
||||
{
|
||||
os << "(left=" << rect.left << ", top=" << rect.top << ", width=" << rect.width << ", height=" << rect.height << ")";
|
||||
return os;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SFML_TESTUTILITIES_WINDOW_HPP
|
||||
|
Loading…
Reference in New Issue
Block a user