diff options
author | Hans Hagen <pragma@wxs.nl> | 2007-09-10 21:31:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2007-09-10 21:31:00 +0200 |
commit | 104ea1dae3d609aeb395e19658ad6ea7d4c85eea (patch) | |
tree | 9e0f83de78120bf8e227025ea69d4a94cbda83e4 /metapost | |
parent | deecfe09c774d4c2835f6999b2cdd9ca07e9bdae (diff) | |
download | context-104ea1dae3d609aeb395e19658ad6ea7d4c85eea.tar.gz |
stable 2007.09.10 21:31
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mp-core.mp | 6 | ||||
-rw-r--r-- | metapost/context/base/mp-spec.mp | 4 |
2 files changed, 9 insertions, 1 deletions
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 ; |