texlive[43118] Build/source/texk/web2c/mplibdir/mp.w: mplibdir/mp.w:
commits+kakuto at tug.org
commits+kakuto at tug.org
Thu Feb 2 01:04:34 CET 2017
Revision: 43118
http://tug.org/svn/texlive?view=revision&revision=43118
Author: kakuto
Date: 2017-02-02 01:04:34 +0100 (Thu, 02 Feb 2017)
Log Message:
-----------
mplibdir/mp.w: sync with the upstream
Modified Paths:
--------------
trunk/Build/source/texk/web2c/mplibdir/mp.w
Modified: trunk/Build/source/texk/web2c/mplibdir/mp.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mp.w 2017-02-01 22:25:24 UTC (rev 43117)
+++ trunk/Build/source/texk/web2c/mplibdir/mp.w 2017-02-02 00:04:34 UTC (rev 43118)
@@ -1,4 +1,4 @@
-% $Id: mp.w 2114 2017-01-12 09:53:45Z luigi $
+% $Id: mp.w 2115 2017-02-01 13:56:12Z luigi $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
@@ -29161,14 +29161,30 @@
unsigned char ljoin, lcap;
mp_number miterlim;
mp_knot q = mp_copy_path (mp, cur_exp_knot ()); /* the original path */
+ mp_knot pen;
mp_knot qq;
+
new_number(miterlim);
- /* TODO: accept elliptical pens for straight paths */
+ pen = (value_knot (p));
+ /* accept elliptical pens for s paths */
+ /* using mp_make_path to convert an elliptical pen to a polygonal one. */
+ /* The approximation of 8 knots should be good enough. */
if (pen_is_elliptical (value_knot (p))) {
- mp_bad_envelope_pen (mp);
- set_cur_exp_knot (q);
- mp->cur_exp.type = mp_path_type;
- return;
+ mp_knot kp,kq;
+ pen = copy_pen (value_knot (p));
+ mp_make_path(mp, pen);
+ kq=pen;
+ do {
+ kp = kq;
+ kq = mp_next_knot (kq);
+ mp_prev_knot (kq) = kp;
+ } while (kq != pen);
+ mp_close_path_cycle (mp, kp, pen);
+ /* old one */
+ /* mp_bad_envelope_pen (mp); */
+ /* set_cur_exp_knot (q); */
+ /* mp->cur_exp.type = mp_path_type; */
+ /*return;*/
}
if (number_greater (internal_value (mp_linejoin), unity_t))
ljoin = 2;
@@ -29186,7 +29202,9 @@
set_number_to_unity(miterlim);
else
number_clone(miterlim, internal_value (mp_miterlimit));
- qq = mp_make_envelope(mp, q, value_knot (p), ljoin, lcap, miterlim);
+
+ /*qq = mp_make_envelope(mp, q, value_knot (p), ljoin, lcap, miterlim);*/
+ qq = mp_make_envelope(mp, q, pen, ljoin, lcap, miterlim);
set_cur_exp_knot (qq);
mp->cur_exp.type = mp_path_type;
More information about the tex-live-commits
mailing list