2
// --------------------------------------------------------------------
4
// --------------------------------------------------------------------
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2004 Otfried Cheong
10
Ipe is free software; you can redistribute it and/or modify it
11
under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
As a special exception, you have permission to link Ipe with the
16
CGAL library and distribute executables, as long as you follow the
17
requirements of the Gnu General Public License in regard to all of
18
the software in the executable aside from CGAL.
20
Ipe is distributed in the hope that it will be useful, but WITHOUT
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
23
License for more details.
25
You should have received a copy of the GNU General Public License
26
along with Ipe; if not, you can find it at
27
"http://www.gnu.org/copyleft/gpl.html", or write to the Free
28
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
37
// --------------------------------------------------------------------
39
class IPE_EXPORT IpeMark : public IpeObject {
41
enum { ECircle = 1, EDisc, EBox, ESquare, ECross };
43
explicit IpeMark(const IpeAllAttributes &attr, const IpeVector &pos);
44
explicit IpeMark(IpeRepository *rep, const IpeXmlAttributes &attr,
46
IpeMark(const IpeMark &rhs);
47
virtual IpeObject *Clone() const;
49
virtual IpeMark *AsMark();
51
virtual void Accept(IpeVisitor &visitor) const;
53
virtual void SaveAsXml(IpePainter &painter, IpeStream &stream,
54
IpeString layer) const;
55
virtual void Draw(IpePainter &painter) const;
56
virtual void AddToBBox(IpeRect &box, const IpeMatrix &m) const;
57
virtual double Distance(const IpeVector &v, const IpeMatrix &m,
59
virtual void SnapVtx(const IpeVector &mouse, const IpeMatrix &m,
60
IpeVector &pos, double &bound) const;
62
virtual void CheckStyle(const IpeStyleSheet *sheet,
63
IpeAttributeSeq &seq) const;
65
inline IpeVector Position() const;
66
inline int Shape() const;
67
inline IpeAttribute Size() const;
69
void SetShape(int shape);
70
void SetSize(IpeAttribute size);
78
// --------------------------------------------------------------------
80
//! Return mark position.
81
inline IpeVector IpeMark::Position() const
87
inline int IpeMark::Shape() const
93
inline IpeAttribute IpeMark::Size() const
98
// --------------------------------------------------------------------