From 46c0953642cf16e575215a49dc36984a681a91d1 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Mon, 1 Feb 2016 14:15:07 +0100 Subject: 2016-02-01 13:28:00 --- metapost/context/base/mpiv/mp-mlib.mpiv | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'metapost') diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv index 2c84d01c2..b4fe8a864 100644 --- a/metapost/context/base/mpiv/mp-mlib.mpiv +++ b/metapost/context/base/mpiv/mp-mlib.mpiv @@ -542,6 +542,16 @@ def withshadevector expr a = withprescript "sh_center_b=" & ddecimal (point ypart a of mfun_shade_path) enddef ; +def withshadedirection expr a = + withprescript "sh_center_a=" & ddecimal (point xpart a of boundingbox(mfun_shade_path)) + withprescript "sh_center_b=" & ddecimal (point ypart a of boundingbox(mfun_shade_path)) +enddef ; + +pair shadedup ; shadedup := (0.5,2.5) ; +pair shadeddown ; shadeddown := (2.5,0.5) ; +pair shadedleft ; shadedleft := (1.5,3.5) ; +pair shadedright ; shadedright := (3.5,1.5) ; + def withshadecenter expr a = withprescript "sh_center_a=" & ddecimal ( center mfun_shade_path shifted ( -- cgit v1.2.3