~ubuntu-branches/ubuntu/intrepid/tcm/intrepid

« back to all changes in this revision

Viewing changes to src/dg/miniarrowellipse.c

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador
  • Date: 2003-07-03 20:08:21 UTC
  • Revision ID: james.westby@ubuntu.com-20030703200821-se4xtqx25e5miczi
Tags: upstream-2.20
ImportĀ upstreamĀ versionĀ 2.20

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
////////////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
 
4
// (c) copyright 1996, Vrije Universiteit Amsterdam.
 
5
// Author: Frank Dehne (frank@cs.vu.nl).
 
6
//
 
7
// TCM is free software; you can redistribute it and/or modify
 
8
// it under the terms of the GNU General Public License as published by
 
9
// the Free Software Foundation; either version 2 of the License, or 
 
10
// (at your option) any later version.
 
11
//
 
12
// TCM is distributed in the hope that it will be useful,
 
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
// GNU General Public License for more details.
 
16
//
 
17
// You should have received a copy of the GNU General Public License
 
18
// along with TCM; if not, write to the Free Software
 
19
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
20
// 02111-1307, USA.
 
21
////////////////////////////////////////////////////////////////////////////////
 
22
#include "miniarrowellipse.h"
 
23
 
 
24
const PolyPoint MiniArrowEllipse::p0(-6, 0, 0, 0,   0, 0, 0, 0, true, true);
 
25
const PolyPoint MiniArrowEllipse::p1( 0, 0, 0, 0,   6, 0, 0, 0, true, true);
 
26
const PolyPoint MiniArrowEllipse::p2( 6, 0, 0, 0,   0, 0, 0, 0, true, true);
 
27
const PolyPoint MiniArrowEllipse::p3( 0, 0, 0, 0,  -6, 0, 0, 0, true, true);
 
28
 
 
29
#define SIN_225 0.38268343236508977
 
30
#define COS_225 0.92387953251128676
 
31
 
 
32
const PolyPoint MiniArrowEllipse::i0(0, 0, 0, 0,  -26, 0, 0, 0, true);
 
33
const PolyPoint MiniArrowEllipse::i1(0, 0, 0, 0,  -6 - 6 * COS_225, 0, 0, 0);
 
34
const PolyPoint MiniArrowEllipse::i2(-10 * SIN_225, 0, 0, 0,   -6 - 10 * COS_225, 0, 0, 0);
 
35
const PolyPoint MiniArrowEllipse::i3(0, 0, 0, 0,  -6, 0, 0, 0);
 
36
const PolyPoint MiniArrowEllipse::i4(10 * SIN_225, 0, 0, 0,  -6 - 10 * COS_225, 0, 0, 0);
 
37
 
 
38
const PolyPoint MiniArrowEllipse::t0(0, 0, 0, -0.5,  -26, 0, 0, -1);
 
39
const PolyPoint MiniArrowEllipse::t1(0, 0, 0, -0.5,  -26, 0, 0,  0);
 
40
const PolyPoint MiniArrowEllipse::t2(0, 0, 0,  0.5,  -26, 0, 0,  0);
 
41
const PolyPoint MiniArrowEllipse::t3(0, 0, 0,  0.5,  -26, 0, 0, -1);
 
42
 
 
43
const PolyPoint MiniArrowEllipse::duplpoint(-6, 0, 0, 0, -20, 0, 0, 0);
 
44
const PolyPoint MiniArrowEllipse::multipoint(6, 0, 0, 0, -20, 0, 0, 0);
 
45
 
 
46
const Polygon MiniArrowEllipse::exterior((new List<const PolyPoint *>)
 
47
        ->add(&p0)->add(&p1)->add(&p2)->add(&p3), Polygon::ON_DEMAND);
 
48
 
 
49
const Polygon MiniArrowEllipse::interior((new List<const PolyPoint *>)
 
50
        ->add(&i0)->add(&i1)->add(&i2)->add(&i3)->add(&i4)->add(&i1),
 
51
        Polygon::ALWAYS);
 
52
 
 
53
const Polygon MiniArrowEllipse::namearea((new List<const PolyPoint *>)
 
54
        ->add(&t0)->add(&t1)->add(&t2)->add(&t3));
 
55
 
 
56
const ShapeType MiniArrowEllipse::maType(Code::MINI_ARROW_ELLIPSE, 12.0, 32.0,
 
57
        0.0, 0.0, &namearea, (const Polygon *) NULL, (const PolyPoint *) NULL,
 
58
        &duplpoint, &multipoint, &exterior, &interior);
 
59
 
 
60
MiniArrowEllipse::MiniArrowEllipse(ShapeView *v, Grafport *g,
 
61
        double x, double y)
 
62
        :NodeShape(v, g, x, y, &maType)
 
63
{
 
64
}
 
65
 
 
66
MiniArrowEllipse::MiniArrowEllipse(const NodeShape &c)
 
67
        :NodeShape(c, &maType)
 
68
{
 
69
}