summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-04-07 15:20:13 +0300
committerMarius <mariausol@gmail.com>2013-04-07 15:20:13 +0300
commit60e23958246a4b340e0daedad4e8d26f0372a81b (patch)
tree93d9e73c71b31b074fe58d7548d075f400109956 /metapost
parent0f0c31f4f2810b8555ca947e206b4efb779c227e (diff)
downloadcontext-60e23958246a4b340e0daedad4e8d26f0372a81b.tar.gz
beta 2013.04.07 14:05
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mp-chem.mpiv20
1 files changed, 10 insertions, 10 deletions
diff --git a/metapost/context/base/mp-chem.mpiv b/metapost/context/base/mp-chem.mpiv
index a8f7d9381..2addb0a73 100644
--- a/metapost/context/base/mp-chem.mpiv
+++ b/metapost/context/base/mp-chem.mpiv
@@ -33,7 +33,7 @@ numeric
boolean
chem_setting_axis,
- chem_doing_pb, chem_text_trace, chem_bd_wedge, chem_tracing,
+ chem_doing_pb, chem_bd_wedge,
chem_star[], chem_front[], chem_stacked[], chem_tetra[] ;
string
@@ -60,6 +60,12 @@ transform
color lightblue ; lightblue := (173/255,216/255,230/255) ;
+% debugging
+
+boolean chem_trace_nesting ; chem_trace_nesting := false ;
+boolean chem_trace_text ; chem_trace_text := false ;
+boolean chem_trace_boundingbox ; chem_trace_boundingbox := false ;
+
chem_axis_color := image(draw origin withcolor lightblue) ;
chem_setting_axis := false ;
chem_axis_rulethickness := 1pt ;
@@ -78,9 +84,7 @@ chem_sb_pair.m := (0.25,1 ) ; %chem_sb_dash.m := dashpattern(off 0.25
chem_sb_pair.p := (0 ,0.75) ; %chem_sb_dash.p := dashpattern(on 0.75 off 0.25) ;
chem_sb_pair.b := (0, 1 ) ; %chem_sb_dash.b := dashpattern(on 1) ;
-chem_text_trace := false ; % debugging
chem_bd_wedge := false ; % true is incorrect, but quite common...
-chem_tracing := false ;
def chem_reset =
chem_rotation := 0 ;
@@ -379,23 +383,19 @@ vardef chem_stop_structure =
endfor
addto currentpicture also chem_pic ;
fi ;
-
- if chem_tracing :
+ if chem_trace_boundingbox :
fill boundingbox currentpicture withcolor blue withtransparency(1,.25) ;
fi ;
setbounds currentpicture to
((chem_setting_l,chem_setting_b) -- (chem_setting_r,chem_setting_b) --
(chem_setting_r,chem_setting_t) -- (chem_setting_l,chem_setting_t) -- cycle) ;
- if chem_tracing :
+ if chem_trace_boundingbox :
fill boundingbox currentpicture withcolor red withtransparency(1,.25) ;
fi ;
- chem_tracing := false ;
enddef ;
% \chemical
-boolean chem_trace_nesting ; chem_trace_nesting := false ;
-
vardef chem_start_component = enddef ;
vardef chem_stop_component = enddef ;
@@ -1530,7 +1530,7 @@ vardef chem_text@#(expr txt, z) =
fi
chem_pic := (chem_pic rotated -chem_setting_rotation) shifted z ;
- if chem_text_trace :
+ if chem_trace_text :
draw z withpen pencircle scaled 2pt withcolor red ;
draw boundingbox chem_pic withpen pencircle scaled 1pt withcolor red ;
fi