mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 12:21:34 +00:00
65 lines
2 KiB
Text
65 lines
2 KiB
Text
|
/*
|
||
|
drawingfuncs.psw
|
||
|
|
||
|
Support functions for the C drawing functions defined in OpenStep.
|
||
|
|
||
|
Copyright (C) 1996,2001 Free Software Foundation, Inc.
|
||
|
|
||
|
Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
|
||
|
Date: January 1997
|
||
|
Rewritten: Adam Fedor <fedor@gnu.org>
|
||
|
Date: May 2001
|
||
|
|
||
|
This file is part of the GNUstep GUI X/DPS Library.
|
||
|
|
||
|
This 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.
|
||
|
|
||
|
This 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 this library; if not, write to the Free
|
||
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||
|
*/
|
||
|
|
||
|
#include <DPS/dpsclient.h>
|
||
|
|
||
|
defineps PSWFrameRectWithWidth (float x, y, w, h, linewidth)
|
||
|
linewidth setlinewidth
|
||
|
0 setgray
|
||
|
x y w h rectstroke
|
||
|
endps
|
||
|
|
||
|
defineps PSWFrameRect (float x, y, w, h)
|
||
|
1 setlinewidth
|
||
|
0 setgray
|
||
|
x y w h rectstroke
|
||
|
endps
|
||
|
|
||
|
defineps PSWDottedFrameRect (float x, y, w, h)
|
||
|
1 setlinewidth
|
||
|
[1] 0 setdash
|
||
|
0 setgray
|
||
|
x y w h rectstroke
|
||
|
endps
|
||
|
|
||
|
/* Optimized drawing of a list of rectangles. The list consists of
|
||
|
sucessive 4-tuples of rectangle values x, y, w, and h. Note that the
|
||
|
number of rectangles cannot exceed 65536/4 = 16384 */
|
||
|
defineps PSWRectFillList (float numstring rectvals[x]; int x)
|
||
|
rectvals rectfill
|
||
|
endps
|
||
|
|
||
|
/* Optimized drawing of a list of rectangles with different gray
|
||
|
values. The list consists of
|
||
|
sucessive 5-tuples of rectangle values x, y, w, h, and gray. Note that the
|
||
|
number of rectangles cannot exceed 65536/5 = 13107 */
|
||
|
defineps PSWRectFillListGray (float rectvals[x]; int x)
|
||
|
mark rectvals {counttomark 4 gt {setgray rectfill} if} forall pop
|
||
|
endps
|