home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula
/
nebula.bin
/
SourceCode
/
Palettes
/
CircularSliderPalette
/
wraps.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-01
|
8KB
|
249 lines
/* wraps.c generated from wraps.psw
by unix pswrap V1.009 Wed Apr 19 17:50:24 PDT 1989
*/
#include <dpsclient/dpsfriends.h>
#include <string.h>
#line 1 "wraps.psw"
/*
* Filename: wraps.psw
* Created : Sat Aug 24 21:25:44 1991
* Author : Vince DeMarco
* <vince@whatnxt.cuc.ab.ca>
*
* Version 1.0.1
*
*/
#line 19 "wraps.c"
void PSdrawCircSlider(float height, float width, float x, float y, float radius, float angle)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjReal obj1;
DPSBinObjReal obj2;
DPSBinObjGeneric obj3;
DPSBinObjReal obj4;
DPSBinObjGeneric obj5;
DPSBinObjReal obj6;
DPSBinObjReal obj7;
DPSBinObjGeneric obj8;
DPSBinObjGeneric obj9;
DPSBinObjGeneric obj10;
DPSBinObjReal obj11;
DPSBinObjReal obj12;
DPSBinObjGeneric obj13;
DPSBinObjGeneric obj14;
DPSBinObjGeneric obj15;
DPSBinObjGeneric obj16;
DPSBinObjReal obj17;
DPSBinObjGeneric obj18;
DPSBinObjReal obj19;
DPSBinObjReal obj20;
DPSBinObjReal obj21;
DPSBinObjGeneric obj22;
DPSBinObjGeneric obj23;
DPSBinObjGeneric obj24;
DPSBinObjGeneric obj25;
DPSBinObjGeneric obj26;
DPSBinObjReal obj27;
DPSBinObjGeneric obj28;
DPSBinObjGeneric obj29;
DPSBinObjReal obj30;
DPSBinObjReal obj31;
DPSBinObjGeneric obj32;
DPSBinObjReal obj33;
DPSBinObjReal obj34;
DPSBinObjGeneric obj35;
DPSBinObjGeneric obj36;
DPSBinObjReal obj37;
DPSBinObjReal obj38;
DPSBinObjReal obj39;
DPSBinObjGeneric obj40;
DPSBinObjReal obj41;
DPSBinObjGeneric obj42;
DPSBinObjGeneric obj43;
DPSBinObjGeneric obj44;
DPSBinObjGeneric obj45;
DPSBinObjGeneric obj46;
DPSBinObjGeneric obj47;
DPSBinObjGeneric obj48;
DPSBinObjGeneric obj49;
DPSBinObjGeneric obj50;
DPSBinObjGeneric obj51;
DPSBinObjReal obj52;
DPSBinObjReal obj53;
DPSBinObjReal obj54;
DPSBinObjGeneric obj55;
DPSBinObjGeneric obj56;
DPSBinObjGeneric obj57;
DPSBinObjGeneric obj58;
DPSBinObjGeneric obj59;
DPSBinObjGeneric obj60;
DPSBinObjGeneric obj61;
DPSBinObjGeneric obj62;
DPSBinObjReal obj63;
DPSBinObjReal obj64;
DPSBinObjGeneric obj65;
DPSBinObjGeneric obj66;
DPSBinObjGeneric obj67;
DPSBinObjGeneric obj68;
DPSBinObjReal obj69;
DPSBinObjReal obj70;
DPSBinObjGeneric obj71;
DPSBinObjGeneric obj72;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 63, 588,
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 78}, /* gsave */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: x */
{DPS_LITERAL|DPS_REAL, 0, 0, 1.5},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169}, /* sub */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: y */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 173}, /* translate */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: height */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: width */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 80}, /* gt */
{DPS_EXEC|DPS_ARRAY, 0, 5, 544},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 84}, /* if */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: height */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: width */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 102}, /* lt */
{DPS_EXEC|DPS_ARRAY, 0, 5, 504},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 84}, /* if */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 111}, /* newpath */
{DPS_LITERAL|DPS_REAL, 0, 0, 0.33333},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
{DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: radius */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_LITERAL|DPS_INT, 0, 0, 360},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 5}, /* arc */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22}, /* closepath */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66}, /* fill */
{DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 111}, /* newpath */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: x */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: width */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 54}, /* div */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: y */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: height */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 54}, /* div */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
{DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
{DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: radius */
{DPS_LITERAL|DPS_INT, 0, 0, 90},
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: angle */
{DPS_LITERAL|DPS_INT, 0, 0, 90},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169}, /* sub */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 110}, /* neg */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 6}, /* arcn */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22}, /* closepath */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66}, /* fill */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150}, /* setgray */
{DPS_LITERAL|DPS_INT, 0, 0, 1},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
{DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
{DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: radius */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_LITERAL|DPS_INT, 0, 0, 360},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 5}, /* arc */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 104}, /* matrix */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 289}, /* defaultmatrix */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 156}, /* setmatrix */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167}, /* stroke */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 77}, /* grestore */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: width */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: height */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 54}, /* div */
{DPS_LITERAL|DPS_INT, 0, 0, 1},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 139}, /* scale */
{DPS_LITERAL|DPS_INT, 0, 0, 1},
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: height */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: width */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 54}, /* div */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 139}, /* scale */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
char pad[3];
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[6].val.realVal =
_dpsP[69].val.realVal =
_dpsP[11].val.realVal =
_dpsP[64].val.realVal =
_dpsP[34].val.realVal = height;
_dpsP[7].val.realVal =
_dpsP[70].val.realVal =
_dpsP[12].val.realVal =
_dpsP[63].val.realVal =
_dpsP[31].val.realVal = width;
_dpsP[1].val.realVal =
_dpsP[30].val.realVal = x;
_dpsP[4].val.realVal =
_dpsP[33].val.realVal = y;
_dpsP[21].val.realVal =
_dpsP[39].val.realVal =
_dpsP[54].val.realVal = radius;
_dpsP[41].val.realVal = angle;
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,588);
if (0) *pad = 0; /* quiets compiler warnings */
}
#line 57 "wraps.psw"
/*********************************
defineps PSdrawRectangle(float x; float y; float width; float height)
%%% Draws a 3D looking (raised) rectangle
gsave
0.66666 setgray
x y width height rectfill
%%%%% left side and top
2 setlinewidth
1 setgray
x y moveto
0 height rlineto
width 0 rlineto
stroke
%%%%% bottom and right light gray
1 setlinewidth
0.33 setgray
x 1 add y 2 add moveto
width 2 sub 0 rlineto
0 height 3 sub rlineto
stroke
%%%%%%%%%%%%%%%%%%%% bottom black
1.5 setlinewidth
0 setgray
x y moveto
width 0 rlineto
stroke
%%%%%%%%%%%%%%%%%%%% right black
1 setlinewidth
0 setgray
x width add y moveto
0 height rlineto
stroke
grestore
endps
**************************/