summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-05-21 11:43:00 +0300
committerTor Lillqvist <tml@collabora.com>2014-05-21 13:26:14 +0300
commit6da81bb513399fe2008b002417bdfb4de68ea341 (patch)
tree7ffb6616b434fda96d5639487c640fbbe48f6147 /include
parent58cb649dbe1bfbbd254fb8c9ac8c7526880b70cc (diff)
Add debugging output operator<< for FontMetric
Change-Id: I8df204b01a73454396561052f10784c71f10d081
Diffstat (limited to 'include')
-rw-r--r--include/vcl/metric.hxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index 27a849849911..f1be383dd111 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -77,8 +77,23 @@ public:
};
-// - FontCharMap -
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & stream, const FontMetric& rMetric )
+{
+ stream << "{"
+ << "name=" << "\"" << rMetric.GetName() << "\""
+ << ",ascent=" << rMetric.GetAscent()
+ << ",descent=" << rMetric.GetDescent()
+ << ",intLeading=" << rMetric.GetIntLeading()
+ << ",extLeading=" << rMetric.GetExtLeading()
+ << ",lineHeight=" << rMetric.GetLineHeight()
+ << ",slant=" << rMetric.GetSlant()
+ << "}";
+ return stream;
+}
+// - FontCharMap -
class VCL_DLLPUBLIC FontCharMap
{