home *** CD-ROM | disk | FTP | other *** search
- // $Id: arcs.vsl,v 1.8 1998/11/23 13:52:58 zeller Exp $
- // Arcs and steep lines for VSL
-
- // 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
- arcs_version() = "$Id: arcs.vsl,v 1.8 1998/11/23 13:52:58 zeller Exp $";
-
- // Synonyms
- arcthickness() = rulethickness();
- arc(start, length) = arc(start, length, arcthickness());
-
- // Makros
- // Arcs
- arc360() = arc(0, 360);
- arc180(start) = arc(start, 180);
- arc90(start) = arc(start, 90);
-
- ne_arc90() = arc90(0);
- nw_arc90() = arc90(90);
- sw_arc90() = arc90(180);
- se_arc90() = arc90(270);
-
- n_arc180() = arc180(0);
- w_arc180() = arc180(90);
- s_arc180() = arc180(180);
- e_arc180() = arc180(270);
-
- // Ovals
- _ovalbody(box) = fix(hrule() | box | hrule());
- _oval(box) =
- fix(w_arc180() ^ (square(vspace(box) - 1) / box(2,1)))
- & box
- & fix(e_arc180() ^ (square(vspace(box) - 1) / box(2,1)));
- oval(box) = _oval(_ovalbody(whiteframe(box)));
-
- // Ellipses
- ellipse() = arc360();
- _ellipse(box) = fix((space(box) * 2) ^ ellipse() ^ center(box));
- ellipse(box) = _ellipse(whiteframe(box, arcthickness() + whitethickness()));
-
- // Circles
- _circle(box) = fix(square(box) ^ ellipse() ^ center(box));
- circle(box) = _circle(whiteframe(box, arcthickness() + whitethickness()));
-