texmf-dist/metapost/metauml/util_margins.mp
raw| 1 | % Copyright 2005 2015 Ovidiu Gheorghies |
| 2 | % Licensed under the Apache License, Version 2.0. |
| 3 | |
| 4 | if known _util_margins_mp: |
| 5 | expandafter endinput |
| 6 | fi; |
| 7 | _util_margins_mp:=1; |
| 8 | |
| 9 | vardef Margins@#(expr pleft, pright, ptop, pbottom)= |
| 10 | attributes(@#); |
| 11 | var(numeric) left, right, top, bottom; |
| 12 | |
| 13 | @#left := pleft; |
| 14 | @#right := pright; |
| 15 | @#top := ptop; |
| 16 | @#bottom := pbottom; |
| 17 | enddef; |
| 18 | |
| 19 | vardef MarginsCopy@#(text src)= |
| 20 | Margins@#(src.left, src.right, src.top, src.bottom); |
| 21 | enddef; |