1
////////////////////////////////////////////////////////////////////////////////
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 1998, Vrije Universiteit Amsterdam and University of Twente.
5
// Author: Henk van de Zandschulp (henkz@cs.utwente.nl).
6
// Author: Frank Dehne (frank@cs.vu.nl).
8
// TCM is free software; you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation; either version 2 of the License, or
11
// (at your option) any later version.
13
// TCM is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
18
// You should have received a copy of the GNU General Public License
19
// along with TCM; if not, write to the Free Software
20
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22
////////////////////////////////////////////////////////////////////////////////
24
#include "solidverticalbar.h"
26
const PolyPoint SolidVerticalBar::p0(-2, 0, 0, 0, 0, 0, -0.5, 0);
27
const PolyPoint SolidVerticalBar::p1(-2, 0, 0, 0, 0, 0, 0.5, 0);
28
const PolyPoint SolidVerticalBar::p2( 2, 0, 0, 0, 0, 0, 0.5, 0);
29
const PolyPoint SolidVerticalBar::p3( 2, 0, 0, 0, 0, 0, -0.5, 0);
31
const Polygon SolidVerticalBar::exterior((new List<const PolyPoint *>)
32
->add(&p0)->add(&p1)->add(&p2)->add(&p3), Polygon::ALWAYS);
34
const ShapeType SolidVerticalBar::svType(Code::SOLID_VERTICAL_BAR, 4.0, 40.0,
35
0.0, 0.0, (const Polygon *) NULL, (const Polygon *) NULL,
36
(const PolyPoint *) NULL, (const PolyPoint *) NULL,
37
(const PolyPoint *) NULL, &exterior);
40
SolidVerticalBar::SolidVerticalBar(ShapeView *v, Grafport *g, double x, double y)
41
:NodeShape(v, g, x, y, &svType)
46
SolidVerticalBar::SolidVerticalBar(const NodeShape &c)
47
:NodeShape(c, &svType)
52
bool SolidVerticalBar::ReadMembers(InputFile *ifile, double format) {
53
if ( ! NodeShape::ReadMembers(ifile, format) )
55
if (format < 1.26) { // setting defaults
56
// SetWidth(BAR_WIDTH);
57
SetHeight(max(GetHeight(), MIN_HEIGHT));
58
// SetFillStyle(FillStyle::FILLED);