home *** CD-ROM | disk | FTP | other *** search
- /*
- * Filename: wraps.psw
- * Created : Sat Aug 24 21:25:44 1991
- * Author : Vince DeMarco <vince@whatnxt.cuc.ab.ca>
- * LastEditDate Was "Mon Sep 6 16:32:45 1993"
- */
-
- defineps PSDrawBackground(float height; float width;
- float center_x; float center_y; float radius)
-
-
- gsave %% save the current graphics state
-
- center_x
- center_y translate %% translate the current point to the center of the
- %% circle
-
- height width gt { %% if the height is greater than the width then
- 1 height width div scale %% scale the y by height / width
- } if
-
- height width lt { %% if height is less than the width then scale
- width height div 1 scale %% the x by width / height
- } if
-
- %%%%%% Draw the Raised Background
-
- newpath
- 1.0 nxsetgray
- -1.0 1.5 radius 2 add 0 360 arc
- closepath
- fill
-
- newpath
- 0.0 nxsetgray
- 1.5 -1 radius 2 add 225 45 arc
- closepath
- fill
-
- newpath
- 0.3333 nxsetgray
- 1.5 -0.25 radius 1 add 0 360 arc
- closepath
- fill
-
- grestore
-
- endps
-
-
- defineps PSPieChart(float height; float width;
- float center_x; float center_y; float radius; float angle)
-
- gsave %% save the current graphics state
-
- center_x
- center_y translate %% translate the current point to the center of the
- %% circle
-
- height width gt { %% if the height is greater than the width then
- 1 height width div scale %% scale the y by height / width
- } if
-
- height width lt { %% if height is less than the width then scale
- width height div 1 scale %% the x by width / height
- } if
-
- %%%%%% Draw the background of the Circular Slider
- newpath
- 0.33333 setgray
- 0 0.5 radius 1 add 0 360 arc
- closepath
- fill
-
- %%%%%% Draw the control portion of Circular Slider
- 0.5 nxsetgray
- newpath
- center_x width div center_y height div moveto
- 0 0.5 radius 90 angle 90 sub neg arcn
- closepath
- fill
-
- %%%%%% stroke out an outline
- % 0 nxsetgray
- % 2 setlinewidth
- % 0.5 0.5 radius 1 add 0 360 arc
- % matrix defaultmatrix setmatrix %% create an empty 6x6 element unit matrix
- %% replace the currently created matrix with the
- %% default matrix for the device then sets up that
- %% matrix as the CTM
- %%
- %% This is done so the stroked lines don't get
- %% wider because of the scaling
- stroke
-
- grestore
-
- endps
-
- defineps PSPieChartDisabled(float height; float width;
- float center_x; float center_y; float radius; float angle)
-
- gsave %% save the current graphics state
-
- center_x
- center_y translate %% translate the current point to the center of the
- %% circle
-
- height width gt { %% if the height is greater than the width then
- 1 height width div scale %% scale the y by height / width
- } if
-
- height width lt { %% if height is less than the width then scale
- width height div 1 scale %% the x by width / height
- } if
-
- %%%%%% Draw the background of the Circular Slider
- newpath
- 0.33333 nxsetgray
- 0.5 0.5 radius 1 add 0 360 arc
- closepath
- fill
-
- %%%%%% Draw the control portion of Circular Slider
- 0.66666 nxsetgray
- newpath
- center_x width div center_y height div moveto
- 0.5 0.5 radius 90 angle 90 sub neg arcn
- closepath
- fill
-
- %%%%%% stroke out an outline
- 0 nxsetgray
- 0.5 setlinewidth
-
- newpath
- 0.5 0.5 radius 1 add 0 360 arc
- closepath
- matrix defaultmatrix setmatrix %% create an empty 6x6 element unit matrix
- %% replace the currently created matrix with the
- %% default matrix for the device then sets up that
- %% matrix as the CTM
- %%
- %% This is done so the stroked lines don't get
- %% wider because of the scaling
- stroke
-
- grestore
-
- endps
-
-
- defineps PSControlKnob(float height; float width;
- float center_x; float center_y; float radius; float xpos; float ypos)
-
- gsave %% save the current graphics state
-
- center_x
- center_y translate %% translate the current point to the center of the
- %% circle
-
- height width gt { %% if the height is greater than the width then
- 1 height width div scale %% scale the y by height / width
- } if
-
- height width lt { %% if height is less than the width then scale
- width height div 1 scale %% the x by width / height
- } if
-
- %%%%%% Draw the Control Portion of the Circular Slider2
- newpath
- 0.6666 nxsetgray
- 0.5 0.5 radius 1 add 0 360 arc
- closepath
- fill
-
- %%%%%% Draw the Knob
- xpos 2 sub ypos 2 sub translate
- 6 6 2 [1 0 0 -1 0 6] <9020455016a01af01bf09be0> image
-
- grestore
-
- endps
-
-
- defineps PSControlKnobDisabled(float height; float width;
- float center_x; float center_y; float radius)
-
- gsave %% save the current graphics state
-
- center_x
- center_y translate %% translate the current point to the center of the
- %% circle
-
- height width gt { %% if the height is greater than the width then
- 1 height width div scale %% scale the y by height / width
- } if
-
- height width lt { %% if height is less than the width then scale
- width height div 1 scale %% the x by width / height
- } if
-
- %%%%%% Draw the Control Portion of the Circular Slider2
- newpath
- 0.6666 nxsetgray
- 0.5 0.5 radius 1 add 0 360 arc
- closepath
- fill
-
- grestore
-
- endps
-