diff --git a/src/main/cpp/tiv.cpp b/src/main/cpp/tiv.cpp index a118b38..db3fb3f 100644 --- a/src/main/cpp/tiv.cpp +++ b/src/main/cpp/tiv.cpp @@ -396,6 +396,11 @@ struct size { size operator*(size lhs, double scale) { return size(lhs.width*scale, lhs.height*scale); } +std::ostream& operator<<(std::ostream& stream, size sz) { + stream << sz.width << "x" << sz.height; + return stream; +} + size fit_within(size container, size object) { double scale = std::min(container.width / (double) object.width, container.height / (double) object.height);