1
//------------------------------------------------------------------------------
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).
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.
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.
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
21
//-----------------------------------------------------------------------------
26
#include "linestyle.h"
31
/// horizontal or vertical line (cell boundary).
33
/*@Doc: {\large {\bf scope:} table} */
36
LinePiece(Grafport *g, Point *from, Point *to,
37
LineStyle::Type style, unsigned width);
44
/// return iff (x,y) is on line piece
45
bool HitLine(int x, int y);
48
void SetLineStyle(LineStyle::Type t) {
51
LineStyle::Type GetLineStyle() {return lineStyle;}
53
void UpdateLineStyle(LineStyle::Type t);
56
void SetLineWidth(unsigned n) {lineWidth = n;}
58
unsigned GetLineWidth() {return lineWidth;}
60
void UpdateLineWidth(unsigned n);
63
void SetBegin(const Point *pt) {beginP = *pt;}
65
void SetEnd(const Point *pt) {endP = *pt;}
68
void SetPoints(const Point *pt1, const Point *pt2)
69
{beginP = *pt1; endP = *pt2;}
71
void UpdatePoints(const Point *pt1, const Point *pt2);
73
void UpdateBegin(const Point *pt);
75
void UpdateEnd(const Point *pt);
77
void SetGrafport(Grafport *g) {grafport = g;}
79
void Write(OutputFile *f);
81
bool Read(InputFile *f, double format);
83
Point *GetBegin() {return &beginP;}
85
Point *GetEnd() {return &endP;}
87
bool IsVisible() {return visible;}
89
void SetVisible(bool b) {visible=b;}
98
LineStyle::Type lineStyle;