/usr/lib/open-axiom/lib/graph/drawIstr.ps is in open-axiom-graphics-data 1.4.1+svn~2299+ds-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | % operand stack configuration in order to use psDrawIStr:
% psDrawIStr
% window type: title or window
% string
% y
% x
% graphics-context dictionary
% it draws a text string in foreground color on top of bounding box of
% string, which is in background color.
/psDrawIStr
{ gsave
newpath %% for rectangle
loadFont
/window exch def %% get window type
%% draw bounding box with background color
/str exch def %% get text string
str stringwidth pop 1 sub %% width
FontHeight 1 sub %% height
currentfont begin %% get font height
FontBBox
end
/ypos exch def pop %% define ypos
neg ypos add /offset exch def pop
/offset ypos offset div FontHeight mul def %% define offset
/h exch def /w exch def %% define h
/y0 exch def %% define y0
/x0 exch def %% define x0
w h x0 y0 offset sub
window (title) eq
{hVal moveto drawRect} %% draws in title window
{rectangle} ifelse %% draws in view window
begin
BGcolor setgray fill %% set background box color
x0 y0
window (title) eq
{hVal} %% print title text
{yVal} ifelse %% print window text
moveto str
FGcolor setgray show %% set text color
end
grestore }
def
|