summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mpiv/mp-mlib.mpiv33
-rw-r--r--metapost/context/base/mpiv/mp-tool.mpiv5
2 files changed, 35 insertions, 3 deletions
diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv
index 48fcbd8c9..807b91dbd 100644
--- a/metapost/context/base/mpiv/mp-mlib.mpiv
+++ b/metapost/context/base/mpiv/mp-mlib.mpiv
@@ -1246,6 +1246,39 @@ def mfun_do_outline_options_d = enddef ;
def mfun_do_outline_options_f = enddef ;
def mfun_do_outline_options_r = enddef ;
+def outlinetexttopath(text o, p, n) =
+ scantokens("numeric " & str n & ";") ;
+ scantokens("path " & str p & "[];") ;
+ n := 0 ;
+ for i within o : p[incr(n)] := pathpart i ; endfor ;
+enddef ;
+
+def filloutlinetext(expr o) =
+ draw image (
+ save n, m ; numeric n, m ; n := m := 0 ;
+ for i within o :
+ n := n + 1 ;
+ endfor ;
+ for i within o :
+ m := m + 1 ;
+ if n = m :
+ eofill
+ else :
+ nofill
+ fi pathpart i ;
+ endfor ;
+ )
+enddef ;
+
+def drawoutlinetext(expr o) =
+ draw image (
+ % nicer for properties
+ for i within o :
+ draw pathpart i ;
+ endfor ;
+ )
+enddef ;
+
if mfun_use_one_pass :
vardef outlinetext@# (expr t) text rest =
diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv
index 8a11d8fda..4c7303f44 100644
--- a/metapost/context/base/mpiv/mp-tool.mpiv
+++ b/metapost/context/base/mpiv/mp-tool.mpiv
@@ -325,7 +325,7 @@ let pop_boundingbox = popboundingbox ; % downward compatible
vardef boundingbox primary p =
if (path p) or (picture p) :
- llcorner p -- lrcorner p -- urcorner p -- ulcorner p
+ llcorner p -- lrcorner p -- urcorner p -- ulcorner p
else :
origin
fi -- cycle
@@ -3409,8 +3409,7 @@ primarydef p crossingunder q =
a := hold[hold] ; hold := hold - 1 ;
fi
if i = crossingnumbermax :
- message("crossingunder reached maximum " & decimal i &
- " intersections.");
+ message("crossingunder reached maximum " & decimal i & " intersections.");
fi
endfor