summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-10 21:01:13 +0000
committerKarl Berry <karl@freefriends.org>2016-04-10 21:01:13 +0000
commit6485e226745fdea37ad21cde17db5598856f0c59 (patch)
treeddcf2a71cd0e3374c21feca50f564143625f17bc /Master/texmf-dist/metapost
parent29484417f94035497851ce9993154d3e6e6d83e8 (diff)
mcf2graph (10apr16)
git-svn-id: svn://tug.org/texlive/trunk@40386 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r--Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf15
1 files changed, 10 insertions, 5 deletions
diff --git a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
index ff213020f0c..3bca433c396 100644
--- a/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
+++ b/Master/texmf-dist/metapost/mcf2graph/mcf2graph.mf
@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% mcf2graph ver 3.88 Copyright (c) 2013-2016 Akira Yamaji
+% mcf2graph ver 3.89 Copyright (c) 2013-2016 Akira Yamaji
%
% Permission is hereby granted, free of charge, to any person obtaining a copy of this software
% and associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -87,7 +87,7 @@ def_com(-4000)(_term,_jp_atom,_jp_atom_abs,_jp_bond,_cyc,_cyc_sB,_cyc_eB,_set_li
_dl,_N,_O,_S,_H,_tmp_line,_chg_len,_get_len,_ring_len,_tmp_len,_rot_ang,_set_ang,_adj_ang,_chg_env,
_tmp_env,_set_colorA,_set_colorB,_postA,_postB,_postC,_postD,_postE,_postF,_set_psA,_stack_reset,
_set_clr,_set_adr,_mk_bond,_set_atom,_arg_ang,_chg_atom,_tmp_rot,_fuse,_push,_pop,_size_a);
-def_com(1)(si,dl,dr,dm,tm,wf,wb,bd,zf,zb,ov,dt,no,ar,vf,vb,wv,nl);
+def_com(1)(si,dl,dr,dm,tm,wf,wb,bd,bz,zf,zb,ov,dt,no,ar,vf,vb,wv,nl);
%-------------------------------------------------------------------------------------------------
def parameter_list=
sw_checklist,sw_numberA,sw_numberB,sw_mol_frame,sw_auxout,sw_solid,sw_expand,sw_MOLout,
@@ -508,11 +508,15 @@ enddef;
def wpcs expr n= withpen pencircle scaled n enddef;
def sqr(expr WD,HT)= ((0,0)--(WD,0)--(WD,HT)--(0,HT)--cycle) enddef;
def sfB(expr p,l,r)= p shifted ((l,0) rotated r) enddef;
-def z_put(expr PA,PB,PD,CL)= save nA,nC,nD; nC:=length(Le-Ls);
+def wz_put(expr PA,PB,PD,CL)= save nA,nC,nD; nC:=length(Le-Ls);
for i=0 upto nC/zebra_gap:
nA:=zebra_gap*i/nC; nD:=(zebra_gap*i+ratio_zebra_black*zebra_gap)/nC;
if nD>((nC-zebra_gap)/nC): nD:=1; fi
fill nA[PB,PA]--nA[PD,PA]--nD[PD,PA]--nD[PB,PA]--cycle Cp(CL); endfor enddef;
+def bz_put(expr PA,PB,PC,PD,CL)= save nA,nC,nD; nC:=length(Le-Ls);
+ for i=0 upto nC/zebra_gap:
+ nA:=zebra_gap*i/nC; nD:=(zebra_gap*i+ratio_zebra_black*zebra_gap)/nC;
+ fill nA[PB,PA]--nA[PD,PC]--nD[PD,PC]--nD[PB,PA]--cycle Cp(CL); endfor enddef;
def cut_off(expr p,w,h,s)=
p intersectionpoint sqr(1.1w,1.1h) shifted (s-(.5(1.1w),.5(1.1h))); enddef;
def clipping(expr SA,SB,PA,PB,LEN)=
@@ -548,8 +552,9 @@ if (nC>0)and(LN<>0):
elseif LN=wf:fill Ls--sfB(Le,ww,am)--sfB(Le,ww,ap)--cycle;
elseif LN=wb:fill sfB(Ls,ww,am)--Le--sfB(Ls,ww,ap)--cycle;
elseif LN=bd:draw pA withpen penrazor rotated ap scaled gap Cp(nB);
- elseif LN=zf:z_put(Ls,sfB(Le,ww,ap),sfB(Le,ww,am),nB);
- elseif LN=zb:z_put(Le,sfB(Ls,ww,am),sfB(Ls,ww,ap),nB);
+ elseif LN=bz:bz_put(sfB(Ls,ww,ap),sfB(Le,ww,ap),sfB(Ls,ww,am),sfB(Le,ww,am),nB);
+ elseif LN=zf:wz_put(Ls,sfB(Le,ww,ap),sfB(Le,ww,am),nB);
+ elseif LN=zb:wz_put(Le,sfB(Ls,ww,am),sfB(Ls,ww,ap),nB);
elseif LN=dt:for i=0 step .75zebra_gap/length(Le-Ls) until 1: drawdot i[Ls,Le]; endfor
elseif LN=wv:draw_wv;
elseif LN=ov:erase draw 0.15[Ls,Le]--0.85[Ls,Le] wpcs gap; draw pA Cp(nB);