summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/niceframe/umrand.mf
blob: 7d4480bb85ba1b999fcfb63885c3359d56481540 (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The MF-macros of the border-project %
% This file has version number 1.2.   %
% 19.06.1993                          %
% (c) by Andreas Schrell, Wuppertal   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

mode_setup;

penwi#    := 0.1pt#;
penwid#   := 0.2pt#;
penwidd#  := 0.6pt#;

charsize# := 10pt#;

font_size           charsize#;
font_x_height       charsize#;
font_quad           charsize#;
font_normal_space   0pt#;
font_normal_shrink  0pt#;
font_normal_stretch 0pt#;

normw# := charsize#;
normh# := charsize#;
define_pixels(normw,normh);

def ow = hround(xscal*normw) enddef;
def oh = vround(normh) enddef;

xscal:=1;

define_blacker_pixels(penwi,penwid,penwidd); penwidow := penwid;

if unknown write_white_engine:
   boolean write_white_engine;
   write_white_engine := false; 
fi
if write_white_engine:
   % for penwi its ok to become 1 pixel width, but...
   penwid := max(penwid,2);
   penwidd := max(penwidd,3);
fi;

def sec(expr n) =
   u := (w/n);
   v := (h/n);
enddef;

def CenterRotation(expr W,r) =
   ((r) shifted (-.5ow,-.5oh) rotated W shifted (.5w,.5h))
enddef;

def CenterRot(expr W) =
	currenttransform := identity
    shifted (-.5ow,-.5oh) rotated W shifted (.5w,.5h)
enddef;



def CenterMirror(expr xs,ys,r) =
   ((r) shifted (-.5ow,-.5oh) xscaled (xs) yscaled (ys) shifted (.5ow,.5oh))
enddef;

endinput