1 /****************************************************************************
2 ** $Id: rs_leader.h 2367 2005-04-04 16:57:36Z andrew $
4 ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
6 ** This file is part of the qcadlib Library project.
8 ** This file may be distributed and/or modified under the terms of the
9 ** GNU General Public License version 2 as published by the Free Software
10 ** Foundation and appearing in the file LICENSE.GPL included in the
11 ** packaging of this file.
13 ** Licensees holding valid qcadlib Professional Edition licenses may use
14 ** this file in accordance with the qcadlib Commercial License
15 ** Agreement provided with the Software.
17 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 ** See http://www.ribbonsoft.com for further details.
22 ** Contact info@ribbonsoft.com if any conditions of this licensing are
25 **********************************************************************/
30 #include "rs_entity.h"
31 #include "rs_entitycontainer.h"
34 * Holds the data that defines a leader.
40 RS_LeaderData(bool arrowHeadFlag)
42 arrowHead = arrowHeadFlag;
45 friend std::ostream & operator<<(std::ostream & os, const RS_LeaderData & /*ld*/)
51 /** true: leader has an arrow head. false: no arrow. */
56 * Class for a leader entity (kind of a polyline arrow).
58 * @author Andrew Mustun
60 class RS_Leader: public RS_EntityContainer
63 RS_Leader(RS_EntityContainer * parent = NULL);
64 RS_Leader(RS_EntityContainer * parent, const RS_LeaderData & d);
67 virtual RS_Entity * clone();
68 virtual RS2::EntityType rtti() const;
69 virtual void update();
70 RS_LeaderData getData() const;
72 virtual RS_Entity * addVertex(const Vector & v);
73 virtual void addEntity(RS_Entity * entity);
74 virtual double getLength();
75 virtual void move(Vector offset);
76 virtual void rotate(Vector center, double angle);
77 virtual void scale(Vector center, Vector factor);
78 virtual void mirror(Vector axisPoint1, Vector axisPoint2);
79 virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
81 friend std::ostream & operator<<(std::ostream & os, const RS_Leader & l);