diff options
author | Marius <mariausol@gmail.com> | 2013-09-12 13:00:29 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-09-12 13:00:29 +0300 |
commit | ecba7ee5768381e147782d6d73815b152f5c504a (patch) | |
tree | aefdbc8fc6de2d46d06d6a71d174b48ab599a2da /metapost/context/base | |
parent | 7e8fc3c7ea353c9331f92634ceeeaa724ccdeb01 (diff) | |
download | context-ecba7ee5768381e147782d6d73815b152f5c504a.tar.gz |
beta 2013.09.12 11:48
Diffstat (limited to 'metapost/context/base')
-rw-r--r-- | metapost/context/base/mp-tool.mpiv | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv index 7f6972bf2..6003ea75c 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mp-tool.mpiv @@ -2438,6 +2438,22 @@ enddef ; % ) % enddef ; +%D New helpers: + +def beginglyph(expr unicode, width, height, depth) = + beginfig(unicode) ; % the number is irrelevant + charcode := unicode ; + charwd := width ; + charht := height ; + chardp := depth ; +enddef ; + +def endglyph = + currentpicture := currentpicture scaled charscale ; + setbounds currentpicture to (boundingbox unitsquare xscaled charwd yscaled (charht + chardp) shifted (0,-chardp)) ; + endfig ; +enddef ; + %D Dimensions have bever been an issue as traditional MP can't make that large %D pictures, but with double mode we need a catch: |