51 lines
834 B
PostScript
51 lines
834 B
PostScript
% $Header: /cvsroot/html2ps/postscript/box.input.radio.ps,v 1.1 2005/12/18 07:21:37 Konstantin Exp $
|
|
|
|
/show-checked-circle-box {
|
|
% render empty (unchecked) radio button
|
|
show-circle-box
|
|
|
|
% Get circle center coordinates
|
|
dup get-left
|
|
1 index get-right
|
|
add 2 div
|
|
|
|
1 index get-top
|
|
2 index get-bottom
|
|
add 2 div % => CX CY
|
|
|
|
% Calculate circle radius
|
|
2 index get-width
|
|
6 div
|
|
|
|
0 360
|
|
0.25 setlinewidth
|
|
|
|
% render the black point in the button's center
|
|
newpath
|
|
arc
|
|
fill
|
|
} def
|
|
|
|
/show-circle-box {
|
|
% Get circle center coordinates
|
|
dup get-left
|
|
1 index get-right
|
|
add 2 div
|
|
|
|
1 index get-top
|
|
2 index get-bottom
|
|
add 2 div
|
|
|
|
% calculate circle radius
|
|
2 index get-width
|
|
3 div
|
|
|
|
0 360
|
|
0.25 setlinewidth
|
|
|
|
% render the empty (unchecked) radio button
|
|
newpath
|
|
arc
|
|
stroke
|
|
} def
|