summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-25 14:15:08 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-25 14:15:08 +0100
commit2956fe45a7fd41b8f84ccec8edcba66a3445e6e9 (patch)
tree9b8bb67ac817b66a7395ae7b2a8c7b5586079f32 /metapost
parent33e29b1ba0661b0f58605749528362a0e12eae52 (diff)
downloadcontext-2956fe45a7fd41b8f84ccec8edcba66a3445e6e9.tar.gz
2016-02-25 14:02:00
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mpiv/mp-mlib.mpiv10
-rw-r--r--metapost/context/base/mpiv/mp-page.mpiv29
2 files changed, 34 insertions, 5 deletions
diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv
index 17ec983a1..326342b70 100644
--- a/metapost/context/base/mpiv/mp-mlib.mpiv
+++ b/metapost/context/base/mpiv/mp-mlib.mpiv
@@ -1451,11 +1451,11 @@ vardef formatted(expr f, x) = textext(varfmt(f, x)) enddef ;
% new
-def both text t = draw t withpostscript "both" enddef ; % we use draw because we need the proper boundingbox
-def eoboth text t = draw t withpostscript "eoboth" enddef ; % we use draw because we need the proper boundingbox
-def eofill text t = fill t withpostscript "evenodd" enddef ;
-def nofill text t = fill t withpostscript "collect" enddef ;
-%%% eoclip text t = clip t withpostscript "evenodd" enddef ; % no postscripts yet
+def fillup text t = draw t withpostscript "both" enddef ; % we use draw because we need the proper boundingbox
+def eofillup text t = draw t withpostscript "eoboth" enddef ; % we use draw because we need the proper boundingbox
+def eofill text t = fill t withpostscript "evenodd" enddef ;
+def nofill text t = fill t withpostscript "collect" enddef ;
+%%% eoclip text t = clip t withpostscript "evenodd" enddef ; % no postscripts yet
% def withrule expr r =
% if (t = "even-odd") or (t = "evenodd") : withpostscript "evenodd" fi
diff --git a/metapost/context/base/mpiv/mp-page.mpiv b/metapost/context/base/mpiv/mp-page.mpiv
index a6fa3fba3..4ccf4448e 100644
--- a/metapost/context/base/mpiv/mp-page.mpiv
+++ b/metapost/context/base/mpiv/mp-page.mpiv
@@ -662,3 +662,32 @@ def Enlarged (expr p, d) =
urEnlarged (p,d) --
ulEnlarged (p,d) -- cycle)
enddef ;
+
+% for the moment we put these here:
+
+numeric RuleWidth ; RuleWidth := 0 ;
+numeric RuleHeight ; RuleHeight := 0 ;
+numeric RuleDepth ; RuleDepth := 0 ;
+numeric RuleThickness ; RuleThickness := 0 ;
+numeric RuleFactor ; RuleFactor := 0 ;
+numeric RuleOffset ; RuleOffset := 0 ;
+ def RuleColor = (.5white) enddef ;
+
+def FakeWord(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled (RuleDepth-RuleThickness/2)
+ withcolor RuleColor ;
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled (RuleHeight-RuleDepth-RuleThickness/2)
+ shifted (0,RuleDepth+RuleThickness)
+ withcolor RuleColor ;
+enddef ;
+
+def FakeRule(expr RuleWidth, RuleHeight, RuleDepth, RuleThickness) (text RuleColor) =
+ fill unitsquare
+ xscaled RuleWidth
+ yscaled RuleHeight
+ withcolor RuleColor ;
+enddef ;