TextStream& operator<<(TextStream& ts, const FloatPoint& p) { ts << "("; if (hasFractions(p.x())) ts << p.x(); else ts << int(p.x()); ts << ","; if (hasFractions(p.y())) ts << p.y(); else ts << int(p.y()); return ts << ")"; }
TextStream& operator<<(TextStream& ts, const FloatSize& s) { ts << "width="; if (hasFractions(s.width())) ts << s.width(); else ts << int(s.width()); ts << " height="; if (hasFractions(s.height())) ts << s.height(); else ts << int(s.height()); return ts; }
TextStream& TextStream::operator<<(const FormatNumberRespectingIntegers& numberToFormat) { if (hasFractions(numberToFormat.value)) return *this << numberToFormat.value; m_text.appendNumber(static_cast<int>(round(numberToFormat.value))); return *this; }
TextStream& operator<<(TextStream& ts, const FloatRect &r) { ts << "at ("; if (hasFractions(r.x())) ts << r.x(); else ts << int(r.x()); ts << ","; if (hasFractions(r.y())) ts << r.y(); else ts << int(r.y()); ts << ") size "; if (hasFractions(r.width())) ts << r.width(); else ts << int(r.width()); ts << "x"; if (hasFractions(r.height())) ts << r.height(); else ts << int(r.height()); return ts; }