diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/niceframe/umrand.mf |
Initial commit
Diffstat (limited to 'macros/latex/contrib/niceframe/umrand.mf')
-rw-r--r-- | macros/latex/contrib/niceframe/umrand.mf | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/macros/latex/contrib/niceframe/umrand.mf b/macros/latex/contrib/niceframe/umrand.mf new file mode 100644 index 0000000000..7d4480bb85 --- /dev/null +++ b/macros/latex/contrib/niceframe/umrand.mf @@ -0,0 +1,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 + |