diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
commit | 8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch) | |
tree | 94286bc131ef7d994f9432febaf03fe23d10eef8 /metapost | |
parent | f5aed2e51223c36c84c5f25a6cad238b2af59087 (diff) | |
download | context-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz |
2016-01-12 16:26:00
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/common/metafun.mp (renamed from metapost/context/base/metafun.mp) | 0 | ||||
-rw-r--r-- | metapost/context/base/common/mp-back.mp | 5 | ||||
-rw-r--r-- | metapost/context/base/common/mp-fobg.mp | 5 | ||||
-rw-r--r-- | metapost/context/base/common/mp-symb.mp | 6 | ||||
-rw-r--r-- | metapost/context/base/mpii/metafun.mpii (renamed from metapost/context/base/metafun.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-back.mpii (renamed from metapost/context/base/mp-back.mp) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-base.mpii (renamed from metapost/context/base/mp-base.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-butt.mpii (renamed from metapost/context/base/mp-butt.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-char.mpii (renamed from metapost/context/base/mp-char.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-core.mpii (renamed from metapost/context/base/mp-core.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-figs.mpii (renamed from metapost/context/base/mp-figs.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-fobg.mpii (renamed from metapost/context/base/mp-fobg.mp) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-form.mpii (renamed from metapost/context/base/mp-form.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-func.mpii (renamed from metapost/context/base/mp-func.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-grid.mpii (renamed from metapost/context/base/mp-grid.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-grph.mpii (renamed from metapost/context/base/mp-grph.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-page.mpii (renamed from metapost/context/base/mp-page.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-shap.mpii (renamed from metapost/context/base/mp-shap.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-spec.mpii (renamed from metapost/context/base/mp-spec.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-step.mpii (renamed from metapost/context/base/mp-step.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-text.mpii (renamed from metapost/context/base/mp-text.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-tool.mpii (renamed from metapost/context/base/mp-tool.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpii/mp-txts.mpii (renamed from metapost/context/base/mp-txts.mpii) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/metafun.mpiv (renamed from metapost/context/base/metafun.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-abck.mpiv (renamed from metapost/context/base/mp-abck.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-apos.mpiv (renamed from metapost/context/base/mp-apos.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-asnc.mpiv (renamed from metapost/context/base/mp-asnc.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-back.mpiv | 205 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-bare.mpiv (renamed from metapost/context/base/mp-bare.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-base.mpiv (renamed from metapost/context/base/mp-base.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-butt.mpiv (renamed from metapost/context/base/mp-butt.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-char.mpiv (renamed from metapost/context/base/mp-char.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-chem.mpiv (renamed from metapost/context/base/mp-chem.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-core.mpiv (renamed from metapost/context/base/mp-core.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-cows.mpiv (renamed from metapost/context/base/mp-cows.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-crop.mpiv (renamed from metapost/context/base/mp-crop.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-figs.mpiv (renamed from metapost/context/base/mp-figs.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-fobg.mpiv | 87 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-form.mpiv (renamed from metapost/context/base/mp-form.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-func.mpiv (renamed from metapost/context/base/mp-func.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-grap.mpiv (renamed from metapost/context/base/mp-grap.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-grid.mpiv (renamed from metapost/context/base/mp-grid.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-grph.mpiv (renamed from metapost/context/base/mp-grph.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-idea.mpiv (renamed from metapost/context/base/mp-idea.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-luas.mpiv (renamed from metapost/context/base/mp-luas.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-mlib.mpiv (renamed from metapost/context/base/mp-mlib.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-page.mpiv (renamed from metapost/context/base/mp-page.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-shap.mpiv (renamed from metapost/context/base/mp-shap.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-step.mpiv (renamed from metapost/context/base/mp-step.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-symb.mpiv (renamed from metapost/context/base/mp-symb.mp) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-text.mpiv (renamed from metapost/context/base/mp-text.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/base/mpiv/mp-tool.mpiv (renamed from metapost/context/base/mp-tool.mpiv) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/bidi-symbols.mp (renamed from metapost/context/fonts/bidi-symbols.mp) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/bidi-symbols.tex (renamed from metapost/context/fonts/bidi-symbols.tex) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/demo-symbols.mp (renamed from metapost/context/fonts/demo-symbols.mp) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/demo-symbols.tex (renamed from metapost/context/fonts/demo-symbols.tex) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/punkfont-bold.mp (renamed from metapost/context/fonts/punkfont-bold.mp) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/punkfont-boldslanted.mp (renamed from metapost/context/fonts/punkfont-boldslanted.mp) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/punkfont-characters.mp (renamed from metapost/context/fonts/punkfont-characters.mp) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/punkfont-definitions.mp (renamed from metapost/context/fonts/punkfont-definitions.mp) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/punkfont-slanted.mp (renamed from metapost/context/fonts/punkfont-slanted.mp) | 0 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/punkfont.mp (renamed from metapost/context/fonts/punkfont.mp) | 0 |
62 files changed, 308 insertions, 0 deletions
diff --git a/metapost/context/base/metafun.mp b/metapost/context/base/common/metafun.mp index ae0a6d6fd..ae0a6d6fd 100644 --- a/metapost/context/base/metafun.mp +++ b/metapost/context/base/common/metafun.mp diff --git a/metapost/context/base/common/mp-back.mp b/metapost/context/base/common/mp-back.mp new file mode 100644 index 000000000..ecfb0c816 --- /dev/null +++ b/metapost/context/base/common/mp-back.mp @@ -0,0 +1,5 @@ +if known mplib : + input mp-back.mpiv +else : + input mp-back.mpii +fi ; diff --git a/metapost/context/base/common/mp-fobg.mp b/metapost/context/base/common/mp-fobg.mp new file mode 100644 index 000000000..b61ea4724 --- /dev/null +++ b/metapost/context/base/common/mp-fobg.mp @@ -0,0 +1,5 @@ +if known mplib : + input mp-fobg.mpiv +else : + input mp-fobg.mpii +fi ; diff --git a/metapost/context/base/common/mp-symb.mp b/metapost/context/base/common/mp-symb.mp new file mode 100644 index 000000000..b39ceaab7 --- /dev/null +++ b/metapost/context/base/common/mp-symb.mp @@ -0,0 +1,6 @@ +if known mplib : + input mp-symb.mpiv +else : + input mp-symb.mpii +fi ; + diff --git a/metapost/context/base/metafun.mpii b/metapost/context/base/mpii/metafun.mpii index 9c55191f7..9c55191f7 100644 --- a/metapost/context/base/metafun.mpii +++ b/metapost/context/base/mpii/metafun.mpii diff --git a/metapost/context/base/mp-back.mp b/metapost/context/base/mpii/mp-back.mpii index f588adea9..f588adea9 100644 --- a/metapost/context/base/mp-back.mp +++ b/metapost/context/base/mpii/mp-back.mpii diff --git a/metapost/context/base/mp-base.mpii b/metapost/context/base/mpii/mp-base.mpii index 7af4bc436..7af4bc436 100644 --- a/metapost/context/base/mp-base.mpii +++ b/metapost/context/base/mpii/mp-base.mpii diff --git a/metapost/context/base/mp-butt.mpii b/metapost/context/base/mpii/mp-butt.mpii index 107886bb5..107886bb5 100644 --- a/metapost/context/base/mp-butt.mpii +++ b/metapost/context/base/mpii/mp-butt.mpii diff --git a/metapost/context/base/mp-char.mpii b/metapost/context/base/mpii/mp-char.mpii index 63a71eff8..63a71eff8 100644 --- a/metapost/context/base/mp-char.mpii +++ b/metapost/context/base/mpii/mp-char.mpii diff --git a/metapost/context/base/mp-core.mpii b/metapost/context/base/mpii/mp-core.mpii index 33e9b386e..33e9b386e 100644 --- a/metapost/context/base/mp-core.mpii +++ b/metapost/context/base/mpii/mp-core.mpii diff --git a/metapost/context/base/mp-figs.mpii b/metapost/context/base/mpii/mp-figs.mpii index d4fcc2b35..d4fcc2b35 100644 --- a/metapost/context/base/mp-figs.mpii +++ b/metapost/context/base/mpii/mp-figs.mpii diff --git a/metapost/context/base/mp-fobg.mp b/metapost/context/base/mpii/mp-fobg.mpii index f8b709572..f8b709572 100644 --- a/metapost/context/base/mp-fobg.mp +++ b/metapost/context/base/mpii/mp-fobg.mpii diff --git a/metapost/context/base/mp-form.mpii b/metapost/context/base/mpii/mp-form.mpii index d1dac32db..d1dac32db 100644 --- a/metapost/context/base/mp-form.mpii +++ b/metapost/context/base/mpii/mp-form.mpii diff --git a/metapost/context/base/mp-func.mpii b/metapost/context/base/mpii/mp-func.mpii index 94e400b91..94e400b91 100644 --- a/metapost/context/base/mp-func.mpii +++ b/metapost/context/base/mpii/mp-func.mpii diff --git a/metapost/context/base/mp-grid.mpii b/metapost/context/base/mpii/mp-grid.mpii index ea28d60af..ea28d60af 100644 --- a/metapost/context/base/mp-grid.mpii +++ b/metapost/context/base/mpii/mp-grid.mpii diff --git a/metapost/context/base/mp-grph.mpii b/metapost/context/base/mpii/mp-grph.mpii index 782942946..782942946 100644 --- a/metapost/context/base/mp-grph.mpii +++ b/metapost/context/base/mpii/mp-grph.mpii diff --git a/metapost/context/base/mp-page.mpii b/metapost/context/base/mpii/mp-page.mpii index 456ee61cc..456ee61cc 100644 --- a/metapost/context/base/mp-page.mpii +++ b/metapost/context/base/mpii/mp-page.mpii diff --git a/metapost/context/base/mp-shap.mpii b/metapost/context/base/mpii/mp-shap.mpii index 17d21314c..17d21314c 100644 --- a/metapost/context/base/mp-shap.mpii +++ b/metapost/context/base/mpii/mp-shap.mpii diff --git a/metapost/context/base/mp-spec.mpii b/metapost/context/base/mpii/mp-spec.mpii index 19d81f312..19d81f312 100644 --- a/metapost/context/base/mp-spec.mpii +++ b/metapost/context/base/mpii/mp-spec.mpii diff --git a/metapost/context/base/mp-step.mpii b/metapost/context/base/mpii/mp-step.mpii index e05f00b6e..e05f00b6e 100644 --- a/metapost/context/base/mp-step.mpii +++ b/metapost/context/base/mpii/mp-step.mpii diff --git a/metapost/context/base/mp-text.mpii b/metapost/context/base/mpii/mp-text.mpii index 5f96f6788..5f96f6788 100644 --- a/metapost/context/base/mp-text.mpii +++ b/metapost/context/base/mpii/mp-text.mpii diff --git a/metapost/context/base/mp-tool.mpii b/metapost/context/base/mpii/mp-tool.mpii index a5bb345a1..a5bb345a1 100644 --- a/metapost/context/base/mp-tool.mpii +++ b/metapost/context/base/mpii/mp-tool.mpii diff --git a/metapost/context/base/mp-txts.mpii b/metapost/context/base/mpii/mp-txts.mpii index d3597488f..d3597488f 100644 --- a/metapost/context/base/mp-txts.mpii +++ b/metapost/context/base/mpii/mp-txts.mpii diff --git a/metapost/context/base/metafun.mpiv b/metapost/context/base/mpiv/metafun.mpiv index b1d4f32e7..b1d4f32e7 100644 --- a/metapost/context/base/metafun.mpiv +++ b/metapost/context/base/mpiv/metafun.mpiv diff --git a/metapost/context/base/mp-abck.mpiv b/metapost/context/base/mpiv/mp-abck.mpiv index abd7d8848..abd7d8848 100644 --- a/metapost/context/base/mp-abck.mpiv +++ b/metapost/context/base/mpiv/mp-abck.mpiv diff --git a/metapost/context/base/mp-apos.mpiv b/metapost/context/base/mpiv/mp-apos.mpiv index 7b7737754..7b7737754 100644 --- a/metapost/context/base/mp-apos.mpiv +++ b/metapost/context/base/mpiv/mp-apos.mpiv diff --git a/metapost/context/base/mp-asnc.mpiv b/metapost/context/base/mpiv/mp-asnc.mpiv index 2626e4d58..2626e4d58 100644 --- a/metapost/context/base/mp-asnc.mpiv +++ b/metapost/context/base/mpiv/mp-asnc.mpiv diff --git a/metapost/context/base/mpiv/mp-back.mpiv b/metapost/context/base/mpiv/mp-back.mpiv new file mode 100644 index 000000000..f588adea9 --- /dev/null +++ b/metapost/context/base/mpiv/mp-back.mpiv @@ -0,0 +1,205 @@ +%D \module +%D [ file=mp-back.mp, +%D version=2000.05.31, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=backgrounds, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. + +if known context_back : endinput ; fi ; + +boolean context_back ; context_back := true ; + +def some_hash ( expr hash_width , + hash_height , + hash_linewidth , + hash_linecolor , + hash_angle , + hash_gap ) = + + stripe_gap := hash_gap ; + stripe_angle := hash_angle ; + drawoptions (withpen pencircle scaled hash_linewidth + withcolor hash_linecolor) ; + path p ; p := unitsquare xscaled hash_width yscaled hash_height ; + stripe_path_a () (draw) p ; % next we move it all to quadrant 1 + currentpicture := currentpicture shifted urcorner currentpicture ; + +enddef ; + +def some_double_back (expr back_type , + back_width , + back_height , + back_delta , + back_linewidth , + back_linecolor , + back_fillcolor , + back_topcolor , + back_bottomcolor , + back_leftcolor , + back_rightcolor ) = + + numeric ww ; ww := back_width ; + numeric hh ; hh := back_height ; + numeric dd ; dd := back_delta ; + + color back_nillcolor ; back_nillcolor := back_topcolor ; + + path p ; p := fullsquare xscaled ww yscaled hh ; + path q ; q := fullsquare xscaled (ww-2dd) yscaled (hh-2dd) ; + path r ; r := llcorner p -- + lrcorner p shifted (-3dd,0) .. controls lrcorner p .. + lrcorner p shifted (0, 3dd) -- + urcorner p shifted (0,-3dd) .. controls urcorner p .. + urcorner p shifted (-3dd,0) -- + ulcorner p -- cycle ; + path s ; s := r xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ; + path t ; t := llcorner p -- + lrcorner p -- + urcorner p shifted (0,-3dd) .. controls urcorner p .. + urcorner p shifted (-3dd,0) -- + ulcorner p shifted ( 3dd,0) .. controls ulcorner p .. + ulcorner p shifted (0,-3dd) -- + llcorner p -- cycle ; + path u ; u := t xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ; + path v ; v := llcorner p shifted ( 3dd,0) -- + lrcorner p shifted (-3dd,0) .. controls lrcorner p .. + lrcorner p shifted (0, 3dd) -- + urcorner p shifted (0,-3dd) .. controls urcorner p .. + urcorner p shifted (-3dd,0) -- + ulcorner p shifted ( 3dd,0) .. controls ulcorner p .. + ulcorner p shifted (0,-3dd) .. + llcorner p shifted (0, 3dd) .. controls llcorner p .. cycle ; % {down} .. cycle ; + path w ; w := t xscaled ((ww-2dd)/ww) yscaled ((hh-2dd)/hh) ; + path a ; a := llcorner p -- ulcorner p -- + ulcorner q -- llcorner q -- cycle ; + path b ; b := llcorner p -- lrcorner p -- + lrcorner q -- llcorner q -- cycle ; + path c ; c := lrcorner p -- urcorner p -- + urcorner q -- lrcorner q -- cycle ; + path d ; d := ulcorner p -- urcorner p -- + urcorner q -- ulcorner q -- cycle ; + path e ; e := llcorner p -- lrcorner p -- + urcorner p -- urcorner q -- + lrcorner q -- llcorner q -- cycle ; + path f ; f := llcorner p -- ulcorner p -- + urcorner p -- urcorner q -- + ulcorner q -- llcorner q -- cycle ; + + linecap := butt ; pickup pencircle scaled back_linewidth ; + + if back_type=1 : + + fill p withcolor back_fillcolor ; + fill a withcolor back_leftcolor ; + fill b withcolor back_bottomcolor ; + fill c withcolor back_rightcolor ; + fill d withcolor back_topcolor ; + draw a withcolor back_linecolor ; + draw d withcolor back_linecolor ; + draw b withcolor back_linecolor ; + draw c withcolor back_linecolor ; + + elseif back_type=2 : + + fill p withcolor back_fillcolor ; + fill e withcolor back_bottomcolor ; + fill f withcolor back_topcolor ; + draw e withcolor back_linecolor ; + draw f withcolor back_linecolor ; + + elseif back_type=3 : + + fill v withcolor back_nillcolor ; + fill w withcolor back_fillcolor ; + draw v withcolor back_linecolor ; + draw w withcolor back_linecolor ; + + elseif back_type=4 : + + fill t withcolor back_nillcolor ; + fill u withcolor back_fillcolor ; + draw t withcolor back_linecolor ; + draw u withcolor back_linecolor ; + + elseif back_type=5 : + + t := t rotatedaround(center t,180) ; + u := u rotatedaround(center u,180) ; + + fill t withcolor back_nillcolor ; + fill u withcolor back_fillcolor ; + draw t withcolor back_linecolor ; + draw u withcolor back_linecolor ; + + elseif back_type=6 : + + r := r rotatedaround(center r,180) ; + s := s rotatedaround(center s,180) ; + + fill r withcolor back_nillcolor ; + fill s withcolor back_fillcolor ; + draw r withcolor back_linecolor ; + draw s withcolor back_linecolor ; + + elseif back_type=7 : + + fill r withcolor back_nillcolor ; + fill s withcolor back_fillcolor ; + draw r withcolor back_linecolor ; + draw s withcolor back_linecolor ; + +fi ; + +enddef ; + +endinput ; + +beginfig (1) ; + +some_double_back (1, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, .6white, .7white, .6white) + +currentpicture := currentpicture shifted (0,-3cm) ; + +some_double_back (2, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, .6white, white, white) + +currentpicture := currentpicture shifted (0,-3cm) ; + +some_double_back (3, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, white, white, white) + +currentpicture := currentpicture shifted (0,-3cm) ; + +some_double_back (4, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, white, white, white) + +currentpicture := currentpicture shifted (0,-3cm) ; + +some_double_back (5, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, white, white, white) + +currentpicture := currentpicture shifted (0,-3cm) ; + +some_double_back (6, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, white, white, white) + +currentpicture := currentpicture shifted (0,-3cm) ; + +some_double_back (7, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, white, white, white) + +currentpicture := currentpicture shifted (0,-3cm) ; + +some_double_back (8, 4.5cm, 1.5cm, .25cm, 1mm, + .5white, .8white, .7white, white, white, white) + +endfig ; + +end . diff --git a/metapost/context/base/mp-bare.mpiv b/metapost/context/base/mpiv/mp-bare.mpiv index c6194b1ee..c6194b1ee 100644 --- a/metapost/context/base/mp-bare.mpiv +++ b/metapost/context/base/mpiv/mp-bare.mpiv diff --git a/metapost/context/base/mp-base.mpiv b/metapost/context/base/mpiv/mp-base.mpiv index 28eb57fb8..28eb57fb8 100644 --- a/metapost/context/base/mp-base.mpiv +++ b/metapost/context/base/mpiv/mp-base.mpiv diff --git a/metapost/context/base/mp-butt.mpiv b/metapost/context/base/mpiv/mp-butt.mpiv index 6f5b90a7e..6f5b90a7e 100644 --- a/metapost/context/base/mp-butt.mpiv +++ b/metapost/context/base/mpiv/mp-butt.mpiv diff --git a/metapost/context/base/mp-char.mpiv b/metapost/context/base/mpiv/mp-char.mpiv index f604accd8..f604accd8 100644 --- a/metapost/context/base/mp-char.mpiv +++ b/metapost/context/base/mpiv/mp-char.mpiv diff --git a/metapost/context/base/mp-chem.mpiv b/metapost/context/base/mpiv/mp-chem.mpiv index b861d3f12..b861d3f12 100644 --- a/metapost/context/base/mp-chem.mpiv +++ b/metapost/context/base/mpiv/mp-chem.mpiv diff --git a/metapost/context/base/mp-core.mpiv b/metapost/context/base/mpiv/mp-core.mpiv index 9b7182908..9b7182908 100644 --- a/metapost/context/base/mp-core.mpiv +++ b/metapost/context/base/mpiv/mp-core.mpiv diff --git a/metapost/context/base/mp-cows.mpiv b/metapost/context/base/mpiv/mp-cows.mpiv index 3ad1a98f5..3ad1a98f5 100644 --- a/metapost/context/base/mp-cows.mpiv +++ b/metapost/context/base/mpiv/mp-cows.mpiv diff --git a/metapost/context/base/mp-crop.mpiv b/metapost/context/base/mpiv/mp-crop.mpiv index 00bcdcb44..00bcdcb44 100644 --- a/metapost/context/base/mp-crop.mpiv +++ b/metapost/context/base/mpiv/mp-crop.mpiv diff --git a/metapost/context/base/mp-figs.mpiv b/metapost/context/base/mpiv/mp-figs.mpiv index aac7c5ad2..aac7c5ad2 100644 --- a/metapost/context/base/mp-figs.mpiv +++ b/metapost/context/base/mpiv/mp-figs.mpiv diff --git a/metapost/context/base/mpiv/mp-fobg.mpiv b/metapost/context/base/mpiv/mp-fobg.mpiv new file mode 100644 index 000000000..f8b709572 --- /dev/null +++ b/metapost/context/base/mpiv/mp-fobg.mpiv @@ -0,0 +1,87 @@ +%D \module +%D [ file=mp-fobg.mp, +%D version=2004.03.12, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=Formatting Objects, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. + +if known context_fobg : endinput ; fi ; + +boolean context_fobg ; context_fobg := true ; + +FoNone := 0 ; FoHidden := 1 ; FoDotted := 2 ; FoDashed := 3 ; FoSolid := 4 ; +FoDouble := 5 ; FoGroove := 6 ; FoRidge := 7 ; FoInset := 8 ; FoOutset := 9 ; +FoAll := 0 ; FoTop := 1 ; FoBottom := 2 ; FoLeft := 3 ; FoRight := 4 ; +FoMedium := .5pt ; FoThin := FoMedium/2 ; FoThick := FoMedium*2 ; + +color FoBackgroundColor, FoNoColor, FoLineColor[] ; FoNoColor := (-1,-1,-1) ; +numeric FoLineWidth[], FoLineStyle[] ; +boolean FoFrame, FoBackground, FoSplit ; + +FoFrame := FoBackground := FoSplit := false ; +FoBackgroundColor := white ; +FoDashFactor := .5 ; +FoDotFactor := .375 ; + +for i = FoAll upto FoRight : + FoLineColor[i] := black ; + FoLineWidth[i] := .5pt ; + FoLineStyle[i] := FoNone ; +endfor ; + +def DrawFoFrame(expr n, p) = + drawoptions(withcolor FoLineColor[n] withpen pencircle scaled FoLineWidth[n]) ; + if FoLineStyle[n] = FoNone : + % nothing + elseif FoLineStyle[n] = FoHidden : + % nothing + elseif FoLineStyle[n] = FoDotted : + draw p dashed (withdots scaled (FoDotFactor*FoLineWidth[n])) ; + elseif FoLineStyle[n] = FoDashed : + draw p dashed (evenly scaled (FoDashFactor*FoLineWidth[n])) ; + elseif FoLineStyle[n] = FoSolid : + draw p ; + elseif FoLineStyle[n] = FoDouble : + draw p enlarged FoLineWidth[n] ; draw p enlarged -FoLineWidth[n] ; + elseif FoLineStyle[n] = FoGroove : + draw p ; + draw p withpen pencircle scaled .5FoLineWidth[n] withcolor (inverted FoLineColor[n] softened .5) ; + elseif FoLineStyle[n] = FoRidge : + draw p withcolor (inverted FoLineColor[n] softened .5) ; + draw p withpen pencircle scaled .5FoLineWidth[n] ; + elseif FoLineStyle[n] = FoInset : + draw p ; draw p inset 2.5FoLineWidth[n] ; + elseif FoLineStyle[n] = FoOutset : + draw p ; draw p outset 2.5FoLineWidth[n] ; + fi ; +enddef ; + +primarydef p outset d = + ((lrcorner p -- urcorner p -- ulcorner p -- llcorner p -- cycle) + shifted (d*(-1,1)) cutbefore topboundary p) cutafter leftboundary p +enddef ; + +primarydef p inset d = + ((ulcorner p -- llcorner p -- lrcorner p -- urcorner p -- cycle) + shifted (d*(1,-1)) cutbefore bottomboundary p) cutafter rightboundary p +enddef ; + +vardef equalpaths(expr p, q) = + if length(p) = length(q) : + save ok ; boolean ok ; ok := true ; + for i = 0 upto length(p)-1 : + ok := ok and (round(point i of p) = round(point i of q)) ; + endfor ; + ok + else : + false + fi +enddef ; + +endinput ; diff --git a/metapost/context/base/mp-form.mpiv b/metapost/context/base/mpiv/mp-form.mpiv index 88b15e097..88b15e097 100644 --- a/metapost/context/base/mp-form.mpiv +++ b/metapost/context/base/mpiv/mp-form.mpiv diff --git a/metapost/context/base/mp-func.mpiv b/metapost/context/base/mpiv/mp-func.mpiv index b1b9d6d5d..b1b9d6d5d 100644 --- a/metapost/context/base/mp-func.mpiv +++ b/metapost/context/base/mpiv/mp-func.mpiv diff --git a/metapost/context/base/mp-grap.mpiv b/metapost/context/base/mpiv/mp-grap.mpiv index 4fd8ee5bd..4fd8ee5bd 100644 --- a/metapost/context/base/mp-grap.mpiv +++ b/metapost/context/base/mpiv/mp-grap.mpiv diff --git a/metapost/context/base/mp-grid.mpiv b/metapost/context/base/mpiv/mp-grid.mpiv index b9243b1b9..b9243b1b9 100644 --- a/metapost/context/base/mp-grid.mpiv +++ b/metapost/context/base/mpiv/mp-grid.mpiv diff --git a/metapost/context/base/mp-grph.mpiv b/metapost/context/base/mpiv/mp-grph.mpiv index 5938b9f02..5938b9f02 100644 --- a/metapost/context/base/mp-grph.mpiv +++ b/metapost/context/base/mpiv/mp-grph.mpiv diff --git a/metapost/context/base/mp-idea.mpiv b/metapost/context/base/mpiv/mp-idea.mpiv index 462d97553..462d97553 100644 --- a/metapost/context/base/mp-idea.mpiv +++ b/metapost/context/base/mpiv/mp-idea.mpiv diff --git a/metapost/context/base/mp-luas.mpiv b/metapost/context/base/mpiv/mp-luas.mpiv index c919ba215..c919ba215 100644 --- a/metapost/context/base/mp-luas.mpiv +++ b/metapost/context/base/mpiv/mp-luas.mpiv diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv index 2c84d01c2..2c84d01c2 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mpiv/mp-mlib.mpiv diff --git a/metapost/context/base/mp-page.mpiv b/metapost/context/base/mpiv/mp-page.mpiv index a6fa3fba3..a6fa3fba3 100644 --- a/metapost/context/base/mp-page.mpiv +++ b/metapost/context/base/mpiv/mp-page.mpiv diff --git a/metapost/context/base/mp-shap.mpiv b/metapost/context/base/mpiv/mp-shap.mpiv index 713656510..713656510 100644 --- a/metapost/context/base/mp-shap.mpiv +++ b/metapost/context/base/mpiv/mp-shap.mpiv diff --git a/metapost/context/base/mp-step.mpiv b/metapost/context/base/mpiv/mp-step.mpiv index f7a7ba5de..f7a7ba5de 100644 --- a/metapost/context/base/mp-step.mpiv +++ b/metapost/context/base/mpiv/mp-step.mpiv diff --git a/metapost/context/base/mp-symb.mp b/metapost/context/base/mpiv/mp-symb.mpiv index a84c84e82..a84c84e82 100644 --- a/metapost/context/base/mp-symb.mp +++ b/metapost/context/base/mpiv/mp-symb.mpiv diff --git a/metapost/context/base/mp-text.mpiv b/metapost/context/base/mpiv/mp-text.mpiv index b68e8412a..b68e8412a 100644 --- a/metapost/context/base/mp-text.mpiv +++ b/metapost/context/base/mpiv/mp-text.mpiv diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv index 13104f17e..13104f17e 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mpiv/mp-tool.mpiv diff --git a/metapost/context/fonts/bidi-symbols.mp b/metapost/context/fonts/mpiv/bidi-symbols.mp index abe48b951..abe48b951 100644 --- a/metapost/context/fonts/bidi-symbols.mp +++ b/metapost/context/fonts/mpiv/bidi-symbols.mp diff --git a/metapost/context/fonts/bidi-symbols.tex b/metapost/context/fonts/mpiv/bidi-symbols.tex index ba659ccb7..ba659ccb7 100644 --- a/metapost/context/fonts/bidi-symbols.tex +++ b/metapost/context/fonts/mpiv/bidi-symbols.tex diff --git a/metapost/context/fonts/demo-symbols.mp b/metapost/context/fonts/mpiv/demo-symbols.mp index 822854c94..822854c94 100644 --- a/metapost/context/fonts/demo-symbols.mp +++ b/metapost/context/fonts/mpiv/demo-symbols.mp diff --git a/metapost/context/fonts/demo-symbols.tex b/metapost/context/fonts/mpiv/demo-symbols.tex index e9af4a027..e9af4a027 100644 --- a/metapost/context/fonts/demo-symbols.tex +++ b/metapost/context/fonts/mpiv/demo-symbols.tex diff --git a/metapost/context/fonts/punkfont-bold.mp b/metapost/context/fonts/mpiv/punkfont-bold.mp index 1c62963f9..1c62963f9 100644 --- a/metapost/context/fonts/punkfont-bold.mp +++ b/metapost/context/fonts/mpiv/punkfont-bold.mp diff --git a/metapost/context/fonts/punkfont-boldslanted.mp b/metapost/context/fonts/mpiv/punkfont-boldslanted.mp index 3e5fa1561..3e5fa1561 100644 --- a/metapost/context/fonts/punkfont-boldslanted.mp +++ b/metapost/context/fonts/mpiv/punkfont-boldslanted.mp diff --git a/metapost/context/fonts/punkfont-characters.mp b/metapost/context/fonts/mpiv/punkfont-characters.mp index da0015b02..da0015b02 100644 --- a/metapost/context/fonts/punkfont-characters.mp +++ b/metapost/context/fonts/mpiv/punkfont-characters.mp diff --git a/metapost/context/fonts/punkfont-definitions.mp b/metapost/context/fonts/mpiv/punkfont-definitions.mp index 2901a9d03..2901a9d03 100644 --- a/metapost/context/fonts/punkfont-definitions.mp +++ b/metapost/context/fonts/mpiv/punkfont-definitions.mp diff --git a/metapost/context/fonts/punkfont-slanted.mp b/metapost/context/fonts/mpiv/punkfont-slanted.mp index 5c1ff46b2..5c1ff46b2 100644 --- a/metapost/context/fonts/punkfont-slanted.mp +++ b/metapost/context/fonts/mpiv/punkfont-slanted.mp diff --git a/metapost/context/fonts/punkfont.mp b/metapost/context/fonts/mpiv/punkfont.mp index 2a03aae81..2a03aae81 100644 --- a/metapost/context/fonts/punkfont.mp +++ b/metapost/context/fonts/mpiv/punkfont.mp |