summaryrefslogtreecommitdiff
path: root/metapost/context/base/mpiv/mp-page.mpiv
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/context/base/mpiv/mp-page.mpiv
parent33e29b1ba0661b0f58605749528362a0e12eae52 (diff)
downloadcontext-2956fe45a7fd41b8f84ccec8edcba66a3445e6e9.tar.gz
2016-02-25 14:02:00
Diffstat (limited to 'metapost/context/base/mpiv/mp-page.mpiv')
-rw-r--r--metapost/context/base/mpiv/mp-page.mpiv29
1 files changed, 29 insertions, 0 deletions
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 ;