home *** CD-ROM | disk | FTP | other *** search
-
- defineps MiscCSDrawBezel(float xx; float yy; float realradius; float width; float grayLevel)
-
- % this is straight from yap and needs tweaking/cleaning up.
- gsave
- xx yy 1 add translate
- /radius realradius 2 sub width 2 div sub def
- /x realradius 1 add def
- /y realradius 2 sub def
- /circle { translate x y radius 0 360 arc closepath stroke } def
- gsave
- width setlinewidth
- 0.333 setgray -2 2 circle 0 1 circle 1 0 circle
- 0 setgray 0 -1 circle 0 -1 circle 1 1 circle
- 1 setgray 0 -2 circle 1 0 circle 0 1 circle
- grayLevel setgray
- -1 0 circle
- grestore
- grestore
- endps
-
- defineps MiscCSDrawKnob(float xx; float yy; float realradius; float width; float angle)
-
- % this is straight from yap and needs tweaking/cleaning up.
- gsave
- xx yy 1 add translate
- /radius realradius 2 sub width 2 div sub def
- /x realradius 1 add def
- /y realradius 2 sub def
- /knobwidth width 4 sub def
- /knob { translate knobwidth knobwidth scale newpath 0.5 0.5 0.5 0 360 arc closepath fill grestore gsave } def
- gsave
- angle cos radius mul x 1 add add
- angle sin radius mul y 1 add add translate
- width 2 div neg 4 sub width 2 div neg 2 add translate
- 0 setgray gsave 7 -2 knob 7 0 knob 5 -2 knob grestore
- 0.333 setgray gsave 6 -1 knob 6 0 knob 5 -1 knob grestore
- 1 setgray gsave 4 1 knob 4 0 knob 5 1 knob grestore
- 0.666 setgray gsave 5 0 knob grestore
- grestore
- grestore
- endps
-
- defineps MiscCSDrawBackground(float center_x; float center_y; float radius; float height; float width)
- gsave
- center_x center_y translate %% xlate to the center of the circle
- %% if height is greater than the width then scale the y by height / width
- height width gt { 1 height width div scale } if
- %% if height is less than the width then scale the x by width / height
- height width lt { width height div 1 scale } if
- %% Draw the Raised Background
- newpath 1.0 setgray -1.0 1.5 radius 2 add 0 360 arc closepath fill
- newpath 0.0 setgray 1.5 -1 radius 2 add 225 45 arc closepath fill
- newpath 0.3333 setgray 1.5 -0.25 radius 1 add 0 360 arc closepath fill
- grestore
- endps
-
- defineps MiscCSPieChart(float center_x; float center_y; float radius; float height; float width; float angle)
- gsave
- center_x center_y translate %% translate to center of circle
- %% if height is greater than the width then scale the y by height / width
- height width gt { 1 height width div scale } if
- %% if height is less than the width then scale the x by width / height
- height width lt { width height div 1 scale } 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 0 0 moveto
- 0 0.5 radius 90 90 angle sub arcn closepath fill
- %% stroke out an outline
- % 0 setgray 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 MiscCSPieChartDisabled(float center_x; float center_y; float radius; float height; float width; float angle)
- gsave
- center_x center_y translate %% translate to the center of the circle
- %% if height is greater than the width then scale the y by height / width
- height width gt { 1 height width div scale } if
- %% if height is less than the width then scale the x by width / height
- height width lt { width height div 1 scale } if
- %% Draw the background of the Circular Slider
- newpath 0.666 setgray 0.5 0.5 radius 1 add 0 360 arc closepath fill
- %% Draw the control portion of Circular Slider
- 0.333 setgray newpath 0 0 moveto
- 0.5 0.5 radius 90 90 angle sub arcn closepath fill
- %% stroke out an outline
- 0 setgray 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 MiscCSControlKnob(float center_x; float center_y; float radius; float height; float width; float angle)
- gsave
- center_x center_y translate %% translate to the center of the circle
- %% if height is greater than the width then scale the y by height / width
- height width gt { 1 height width div scale } if
- %% if height is less than the width then scale the x by width / height
- height width lt { width height div 1 scale } 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
- /rs radius radius 8 mul 100 div sub 2 sub def
- rs angle cos mul 2 sub % xpos
- rs angle sin mul 2 sub % ypos
- translate 6 6 2 [1 0 0 -1 0 6] <9020455016a01af01bf09be0> image
- grestore
- endps
-
- defineps MiscCSControlKnobDisabled(float center_x; float center_y; float radius; float height; float width)
- gsave
- center_x center_y translate %% translate to the center of circle
- %% if height is greater than the width then scale the y by height / width
- height width gt { 1 height width div scale } if
- %% if height is less than the width then scale the x by width / height
- height width lt { width height div 1 scale } 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
-
- defineps MiscCSControlDial(float center_x; float center_y; float radius; float height; float width; float angle; float grayLevel)
- gsave
- center_x center_y translate %% translate to the center of circle
- %% if height is greater than the width then scale the y by height / width
- height width gt { 1 height width div scale } if
- %% if height is less than the width then scale the x by width / height
- height width lt { width height div 1 scale } 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" (line segment) 1/3 of way from center to outside
- grayLevel setgray radius 25 div setlinewidth
- /r2 radius 3 div def /ac angle cos def /as angle sin def
- radius ac mul radius as mul moveto r2 ac mul r2 as mul lineto stroke
- grestore
- endps
-