summaryrefslogtreecommitdiff
path: root/gfx/graphite2/src/inc/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/graphite2/src/inc/debug.h')
-rw-r--r--gfx/graphite2/src/inc/debug.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/gfx/graphite2/src/inc/debug.h b/gfx/graphite2/src/inc/debug.h
index ba77cb191..97175eb2c 100644
--- a/gfx/graphite2/src/inc/debug.h
+++ b/gfx/graphite2/src/inc/debug.h
@@ -1,6 +1,6 @@
/* GRAPHITE2 LICENSING
- Copyright 2010, SIL International
+ Copyright 2011, SIL International
All rights reserved.
This library is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
-// debug.h
+// debug.h
//
// Created on: 22 Dec 2011
// Author: tim
@@ -44,16 +44,17 @@ class CharInfo;
class Segment;
class Slot;
-typedef std::pair<const Segment * const, const Slot * const> dslot;
+typedef std::pair<const Segment * const, const Slot * const> dslot;
struct objectid
{
- char name[16];
- objectid(const dslot &) throw();
- objectid(const Segment * const p) throw();
+ char name[16];
+ objectid(const dslot &) throw();
+ objectid(const Segment * const p) throw();
};
json & operator << (json & j, const Position &) throw();
+json & operator << (json & j, const Rect &) throw();
json & operator << (json & j, const CharInfo &) throw();
json & operator << (json & j, const dslot &) throw();
json & operator << (json & j, const objectid &) throw();
@@ -64,14 +65,21 @@ json & operator << (json & j, const telemetry &) throw();
inline
json & operator << (json & j, const Position & p) throw()
{
- return j << json::flat << json::array << p.x << p.y << json::close;
+ return j << json::flat << json::array << p.x << p.y << json::close;
+}
+
+
+inline
+json & operator << (json & j, const Rect & p) throw()
+{
+ return j << json::flat << json::array << p.bl.x << p.bl.y << p.tr.x << p.tr.y << json::close;
}
inline
json & operator << (json & j, const objectid & sid) throw()
{
- return j << sid.name;
+ return j << sid.name;
}