+ wxInt32 n = lines.GetCount();
+ stream << n << _T('\n');
+
+ wxList::compatibility_iterator node = lines.GetFirst();
+ while (node)
+ {
+ DoodleLine *line = (DoodleLine *)node->GetData();
+ stream << line->x1 << _T(" ") <<
+ line->y1 << _T(" ") <<
+ line->x2 << _T(" ") <<
+ line->y2 << _T("\n");
+ node = node->GetNext();
+ }
+
+ return stream;
+}
+#else
+wxOutputStream &DoodleSegment::SaveObject(wxOutputStream& stream)
+{
+ wxTextOutputStream text_stream( stream );
+
+ wxInt32 n = lines.GetCount();
+ text_stream << n << _T('\n');
+
+ wxList::compatibility_iterator node = lines.GetFirst();