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