From 104ea1dae3d609aeb395e19658ad6ea7d4c85eea Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 10 Sep 2007 21:31:00 +0200 Subject: stable 2007.09.10 21:31 --- metapost/context/base/mp-core.mp | 6 +++++- metapost/context/base/mp-spec.mp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'metapost') diff --git a/metapost/context/base/mp-core.mp b/metapost/context/base/mp-core.mp index 92036febf..c39aa406f 100644 --- a/metapost/context/base/mp-core.mp +++ b/metapost/context/base/mp-core.mp @@ -1006,6 +1006,7 @@ numeric boxlinewidth ; boxlinewidth := 1pt ; numeric boxlineradius ; boxlineradius := 0pt ; numeric boxfilloffset ; boxfilloffset := 0pt ; numeric boxgriddistance ; boxgriddistance := .5cm ; +numeric boxgridshift ; boxgridshift := 0pt ; def draw_box = draw pxy withcolor boxlinecolor withpen pencircle scaled boxlinewidth ; @@ -1162,7 +1163,7 @@ enddef ; vardef baseline_grid (expr pxy, pdir, at_baseline) = if (par_line_height>0) and (bbheight(pxy)>1) and (bbwidth(pxy)>1) and (boxgridwidth>0) : - save i, grid ; picture grid ; pair start ; + save i, grid, bb ; picture grid ; pair start ; path bb ; def _do_ (expr start) = draw start -- start shifted (bbwidth(pxy),0) withpen pencircle scaled boxgridwidth @@ -1186,6 +1187,9 @@ vardef baseline_grid (expr pxy, pdir, at_baseline) = fi ; ) ; clip grid to pxy ; + bb := boundingbox grid ; + grid := grid shifted (0,boxgridshift) ; + setbounds grid to bb ; grid else : nullpicture diff --git a/metapost/context/base/mp-spec.mp b/metapost/context/base/mp-spec.mp index d6f68665b..43d8f095c 100644 --- a/metapost/context/base/mp-spec.mp +++ b/metapost/context/base/mp-spec.mp @@ -220,6 +220,10 @@ pair shadeoffset ; shadeoffset := origin ; % _special_counter_ % enddef ; +% these tests are not yet robust for new gray/cmyk features; +% +% - we need to get rid of cmykcolor() and + vardef _is_cmyk_(expr c) = (redpart c = _special_signal_/_special_div_) and (greenpart c = 1/_special_div_) enddef ; -- cgit v1.2.3