%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%local stuff for the Milieu package

picture picvar; numeric charnr;charnr:=ASCII("A")-1;

def sscreen(expr w_sharp,h_sharp,d_sharp,c_scale) =
 picvar:=currentpicture;
 charscreen(incr charnr,w_sharp,h_sharp,d_sharp)
  currentpicture:=currentpicture scaled c_scale;
 endchar;
 currentpicture:=picvar;
enddef;

def charscreen(expr c,w_sharp,h_sharp,d_sharp) =
 begingroup
 charcode:=if known c: byte c else: 0 fi;
 charwd:=w_sharp;      charht:=h_sharp;       chardp:=d_sharp;
 w:=hround(charwd*hppp); h:=vround(charht*hppp); d:=vround(chardp*hppp);
 charic:=0; scantokens extra_beginchar;
enddef;


% These variables determine the size of \MF's (window system) window for
% online output.  These numbers should match whatever the window system
% is told, or bizarre positioning of the output in the window results.
% Properly implemented online device drivers will use these values as
% the default size.
screen_cols := 800;
screen_rows := 600;
pair screen_topleft;
screen_topleft:=(-50,500);
def openit = openwindow currentwindow
 from origin to (screen_rows,screen_cols) at screen_topleft enddef;

% The mode most commonly used to make fonts here.
localfont := CanonCX;

%%\bye
