home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 mARCH
/
PCWK3A99.iso
/
Linux
/
DDD331
/
DDD-3_1_.000
/
DDD-3_1_
/
ddd-3.1.1
/
vsllib
/
slopes.vsl
< prev
next >
Wrap
Text File
|
1998-11-23
|
4KB
|
96 lines
// $Id: slopes.vsl,v 1.7 1998/11/23 13:53:02 zeller Exp $
// Slopes
// Copyright (C) 1993 Technische Universitaet Braunschweig, Germany.
// Written by Andreas Zeller <zeller@ips.cs.tu-bs.de>.
//
// This file is part of the DDD Library.
//
// The DDD Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// The DDD Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with the DDD Library -- see the file COPYING.LIB.
// If not, write to the Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// DDD is the data display debugger.
// For details, see the DDD World-Wide-Web page,
// `http://www.cs.tu-bs.de/softech/ddd/',
// or send a mail to the DDD developers <ddd@ips.cs.tu-bs.de>.
// Version
slopes_version() = "$Id: slopes.vsl,v 1.7 1998/11/23 13:53:02 zeller Exp $";
// Synonyms
slopethickness() = rulethickness();
rise() = rise(slopethickness());
fall() = fall(slopethickness());
// Makros
// Arrows
_arrowheadsize() = rulethickness() * 6;
_n_arrowhead() = fix((rise() & vrule() & fall()) ^ _arrowheadsize());
_w_arrowhead() = fix((rise() | hrule() | fall()) ^ _arrowheadsize());
_s_arrowhead() = fix((fall() & vrule() & rise()) ^ _arrowheadsize());
_e_arrowhead() = fix((fall() | hrule() | rise()) ^ _arrowheadsize());
n_arrow() = _n_arrowhead() | hcenter(vrule());
w_arrow() = _w_arrowhead() & vcenter(hrule());
s_arrow() = hcenter(vrule()) | _s_arrowhead();
e_arrow() = vcenter(hrule()) & _e_arrowhead();
ns_arrow() = n_arrow() | s_arrow(); // Arrows with common origin
we_arrow() = w_arrow() & e_arrow();
sn_arrow() = s_arrow() | n_arrow(); // Arrows with common target
ew_arrow() = e_arrow() & w_arrow();
_ne_arrowhead() = fix(((hrule() | fill()) & vrule()) ^ _arrowheadsize());
_se_arrowhead() = fix(((fill() | hrule()) & vrule()) ^ _arrowheadsize());
_nw_arrowhead() = fix((vrule() & (hrule() | fill())) ^ _arrowheadsize());
_sw_arrowhead() = fix((vrule() & (fill() | hrule())) ^ _arrowheadsize());
ne_arrow() = rise() ^ (fill() & _ne_arrowhead() | fill());
se_arrow() = fall() ^ (fill() | fill() & _se_arrowhead());
sw_arrow() = rise() ^ (fill() | _sw_arrowhead() & fill());
nw_arrow() = fall() ^ (_nw_arrowhead() & fill() | fill());
// Angles
n_angle() = rise() & fall();
w_angle() = rise() | fall();
s_angle() = fall() & rise();
e_angle() = fall() | rise();
// Punch cards
_punchcardcornersize() = rulethickness() * 10;
_punchcardcorner() = fix(rise() ^ _punchcardcornersize());
punchcard(box) =
(_punchcardcorner() | vrule() & fill() | hrule())
& (n_rule() | box & vwhite() | s_rule())
& vrule();
// Rhombs
_rhomb(box) =
fix((
space(box / 2) & n_angle() & space(box / 2)
| w_angle() & box & e_angle()
| space(box / 2) & s_angle() & space(box / 2)
) ^ space(box * 2));
rhomb(box) = _rhomb(whiteframe(box));
// Octogons
_octogon(box) =
fix((
rise() & (hrule() | fill()) & fall()
| vrule() & fill() & vrule()
| fall() & (fill() | hrule()) & rise()
) ^ square(box) ^ center(box));
octogon(box) = _octogon(whiteframe(box));