From d2f353840917bc4f4036db4ca5028165d46b98b0 Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 24 Aug 2013 02:40:26 +0300 Subject: beta 2013.08.24 01:32 --- metapost/context/base/mp-mlib.mpiv | 9 +++++++++ metapost/context/base/mp-text.mpii | 7 +++++++ 2 files changed, 16 insertions(+) (limited to 'metapost') diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 9a2042924..e768efaec 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -255,6 +255,15 @@ mfun_labtype.drt := 12 ; mfun_labtype.origin := 0 ; mfun_labtype.raw := 0 ; +% installlabel.foo ( 0, 1, 1, (.5,-1) ) ; + +vardef installlabel@# (expr type, x, y, offset) = + numeric labtype@# ; labtype@# := type ; + pair laboff @# ; laboff @# := offset ; + numeric labxf @# ; labxf @# := x ; + numeric labyf @# ; labyf @# := y ; +enddef ; + vardef thetextext@#(expr p,z) = % interim labeloffset := textextoffset ; if string p : diff --git a/metapost/context/base/mp-text.mpii b/metapost/context/base/mp-text.mpii index d529e9242..5f96f6788 100644 --- a/metapost/context/base/mp-text.mpii +++ b/metapost/context/base/mp-text.mpii @@ -109,6 +109,13 @@ pair laboff.raw ; laboff.raw = (0,0) ; % (infinity,infinity) ; laboff.origin = (0,0) ; labxf.origin := 0 ; labyf.origin := 0 ; laboff.raw = (0,0) ; labxf.raw := 0 ; labyf.raw := 0 ; +vardef installlabel@# (expr type, x, y, offset) = + numeric labtype@# ; labtype@# := type ; + pair laboff @# ; laboff @# := offset ; + numeric labxf @# ; labxf @# := x ; + numeric labyf @# ; labyf @# := y ; +enddef ; + vardef thelabel@#(expr s, z) = save p ; picture p ; p = s if not picture s : infont defaultfont scaled defaultscale fi ; -- cgit v1.2.3