summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mp-abck.mpiv15
-rw-r--r--metapost/context/base/mp-apos.mpiv61
2 files changed, 59 insertions, 17 deletions
diff --git a/metapost/context/base/mp-abck.mpiv b/metapost/context/base/mp-abck.mpiv
index 3d5afb903..977bebcfd 100644
--- a/metapost/context/base/mp-abck.mpiv
+++ b/metapost/context/base/mp-abck.mpiv
@@ -178,6 +178,8 @@ def show_multi_kind =
endfor ;
enddef ;
+def multi_side_draw_options = enddef ;
+
def draw_multi_side =
begingroup ; save p ; picture p ;
for i=1 upto nofmultipars :
@@ -191,6 +193,19 @@ def draw_multi_side =
endgroup ;
enddef ;
+def draw_multi_side_path text t =
+ begingroup ; save p ; picture p ;
+ for i=1 upto nofmultipars :
+ p := image ( draw leftboundary multipars[i]
+ shifted (-boxlineoffset,0)
+ withpen pensquare scaled boxlinewidth boxlineoptions t ;
+ ) ;
+ setbounds p to multipars[i] ;
+ draw p ;
+ endfor ;
+ endgroup ;
+enddef ;
+
% some extras
path posboxes[],
diff --git a/metapost/context/base/mp-apos.mpiv b/metapost/context/base/mp-apos.mpiv
index 072c958f3..5f394e468 100644
--- a/metapost/context/base/mp-apos.mpiv
+++ b/metapost/context/base/mp-apos.mpiv
@@ -66,26 +66,53 @@ enddef ;
% anch-bar:
-def anch_sidebars_draw(expr p_b_self, p_e_self, y_b_self, y_e_self, h_b_self, d_e_self, distance, linewidth, linecolor) =
- StartPage ;
- path p ; p :=
+% def anch_sidebars_draw(expr p_b_self, p_e_self, y_b_self, y_e_self, h_b_self, d_e_self, distance, linewidth, linecolor) =
+% StartPage ;
+% path p ; p :=
+% if p_b_self=p_e_self :
+% (xpart ulcorner Field[Text][Text],y_b_self+h_b_self) --
+% (xpart llcorner Field[Text][Text],y_e_self-d_e_self) ;
+% elseif RealPageNumber=p_b_self :
+% (xpart ulcorner Field[Text][Text],y_b_self+h_b_self) --
+% (llcorner Field[Text][Text]) ;
+% elseif RealPageNumber=p_e_self :
+% (ulcorner Field[Text][Text]) --
+% (xpart llcorner Field[Text][Text],y_e_self-d_e_self) ;
+% else :
+% (ulcorner Field[Text][Text]) --
+% (llcorner Field[Text][Text]) ;
+% fi ;
+% p := p shifted (-llcorner Field[Text][Text]-(distance,0)) ;
+% interim linecap := butt ;
+% draw p
+% withpen pencircle scaled linewidth
+% withcolor linecolor ;
+% StopPage ;
+% enddef ;
+
+def anch_sidebars_draw (expr p_b_self, p_e_self, y_b_self, y_e_self, h_b_self, d_e_self,
+ x, y, w, h, alternative, distance, linewidth, linecolor) =
+ begingroup ;
+ if alternative = 1 :
+ % nothing
+ else :
+ interim linecap := butt ;
+ fi ;
+ draw
if p_b_self=p_e_self :
- (xpart ulcorner Field[Text][Text],y_b_self+h_b_self) --
- (xpart llcorner Field[Text][Text],y_e_self-d_e_self) ;
+ (-distance,y_b_self+h_b_self-y) -- (-distance,y_e_self-d_e_self-y)
elseif RealPageNumber=p_b_self :
- (xpart ulcorner Field[Text][Text],y_b_self+h_b_self) --
- (llcorner Field[Text][Text]) ;
+ (-distance,y_b_self+h_b_self-y) -- (-distance,0) ;
elseif RealPageNumber=p_e_self :
- (ulcorner Field[Text][Text]) --
- (xpart llcorner Field[Text][Text],y_e_self-d_e_self) ;
+ (-distance,h) -- (-distance,y_e_self-d_e_self-y)
+ else :
+ (-distance,h) -- (-distance,0)
+ fi
+ if alternative = 1 :
+ dashed (withdots scaled (linewidth/2))
else :
- (ulcorner Field[Text][Text]) --
- (llcorner Field[Text][Text]) ;
- fi ;
- p := p shifted (-llcorner Field[Text][Text]-(distance,0)) ;
- interim linecap := butt ;
- draw p
withpen pencircle scaled linewidth
- withcolor linecolor ;
- StopPage ;
+ fi
+ withcolor linecolor ;
+ endgroup ;
enddef ;