~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/ipelib/ipegroup.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2005-02-24 22:09:16 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050224220916-9vxiiqjz066r5489
Tags: 6.0pre23-2
debian/control: Ipe should depend on exact version of libipe.
Closes: #296771.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
  iImp->iRefCount = 1;
63
63
  iImp->iHasMarks = false;
64
64
  iImp->iHasTexts = false;
65
 
  iMarkShape = 0; // null
 
65
  IpeString str;
 
66
  if (attr.Has("marksize", str))
 
67
    iMarkSize = rep->MakeScalar(IpeAttribute::EMarkSize, str);
 
68
  if (attr.Has("textsize", str))
 
69
    iTextSize = rep->MakeScalar(IpeAttribute::EMarkSize, str);
 
70
  if (attr.Has("markshape", str))
 
71
    iMarkShape = IpeLex(str).GetInt();
 
72
  else
 
73
    iMarkShape = 0; // null
66
74
}
67
75
 
68
76
//! Copy constructor. Constant time --- components are not copied!
146
154
                                   IpeStream &stream) const
147
155
{
148
156
  ApplyAttributes(painter);
 
157
  if (!painter.MarkSize())
 
158
    painter.SetMarkSize(iMarkSize);
 
159
  if (!painter.MarkShape())
 
160
    painter.SetMarkShape(iMarkShape);
 
161
  if (!painter.TextSize())
 
162
    painter.SetTextSize(iTextSize);
149
163
  for (const_iterator it = begin(); it != end(); ++it)
150
164
    (*it)->SaveAsXml(painter, stream, IpeString());
151
165
  painter.Pop();
188
202
void IpeGroup::Draw(IpePainter &painter) const
189
203
{
190
204
  ApplyAttributes(painter);
 
205
  if (!painter.MarkSize())
 
206
    painter.SetMarkSize(iMarkSize);
 
207
  if (!painter.MarkShape())
 
208
    painter.SetMarkShape(iMarkShape);
191
209
  for (const_iterator it = begin(); it != end(); ++it)
192
210
    (*it)->Draw(painter);
193
211
  painter.Pop();