mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 07:41:05 +08:00
Move sf::Rect
printer to GraphicsUtil
This commit is contained in:
parent
9b3735c05f
commit
bc7ec1277a
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#include "WindowUtil.hpp"
|
#include "WindowUtil.hpp"
|
||||||
|
|
||||||
|
#include <SFML/Graphics/Rect.hpp>
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
struct BlendMode;
|
struct BlendMode;
|
||||||
@ -17,6 +19,13 @@ namespace sf
|
|||||||
std::ostream& operator <<(std::ostream& os, const BlendMode& blendMode);
|
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 Color& color);
|
||||||
std::ostream& operator <<(std::ostream& os, const Transform& transform);
|
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
|
#endif // SFML_TESTUTILITIES_GRAPHICS_HPP
|
||||||
|
@ -8,21 +8,12 @@
|
|||||||
|
|
||||||
#include "SystemUtil.hpp"
|
#include "SystemUtil.hpp"
|
||||||
|
|
||||||
#include <SFML/Graphics/Rect.hpp>
|
|
||||||
|
|
||||||
// String conversions for doctest framework
|
// String conversions for doctest framework
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
class VideoMode;
|
class VideoMode;
|
||||||
|
|
||||||
std::ostream& operator <<(std::ostream& os, const sf::VideoMode& 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
|
#endif // SFML_TESTUTILITIES_WINDOW_HPP
|
||||||
|
Loading…
Reference in New Issue
Block a user