X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctgraphics%2Fdrawbox.cpp;fp=libctgraphics%2Fdrawbox.cpp;h=9d9eff6807a950226b310c9027efd172f2cc2fa5;hb=bf7295a63667dcca309389ee6dd5328a3a25f22b;hp=0000000000000000000000000000000000000000;hpb=1eb1fcf291b39a016864d78a4060e83cd9046437;p=ctsim.git diff --git a/libctgraphics/drawbox.cpp b/libctgraphics/drawbox.cpp new file mode 100644 index 0000000..9d9eff6 --- /dev/null +++ b/libctgraphics/drawbox.cpp @@ -0,0 +1,61 @@ +/***************************************************************************** +** This is part of the CTSim program +** Copyright (C) 1983-2000 Kevin Rosenberg +** +** $Id: drawbox.cpp,v 1.1 2000/06/19 18:05:03 kevin Exp $ +** $Log: drawbox.cpp,v $ +** Revision 1.1 2000/06/19 18:05:03 kevin +** initial cvs import +** +** Revision 1.1 2000/06/13 16:20:31 kevin +** finished c++ conversions +** +** Revision 1.3 2000/05/24 22:49:01 kevin +** Updated SGP: first function X-windows version +** +** Revision 1.2 2000/05/11 14:07:23 kevin +** Fixed compilation warnings +** +** Revision 1.1.1.1 2000/04/28 13:02:44 kevin +** Initial CVS import for first public release +** +** +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License (version 2) as +** published by the Free Software Foundation. +** +** This program 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 General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +******************************************************************************/ + +/* NAME + * sgp2_draw_rect Draw box in graphics mode + * + * SYNOPSIS + * drawbox (xmin, ymin, xmax, ymax) + * double xmin, ymin Lower left corner of box + * double xmax, ymax Upper left corner of box + * + * NOTES + * This routine leaves the current position of graphic cursor at lower + * left corner of box. + */ + +#include "sgp.h" + +void +sgp2_draw_rect(double xmin, double ymin, double xmax, double ymax) +{ + sgp2_move_abs (xmin, ymin); + sgp2_line_abs (xmax, ymin); + sgp2_line_abs (xmax, ymax); + sgp2_line_abs (xmin, ymax); + sgp2_line_abs (xmin, ymin); +}