作図ソフト dia の改良版
修訂 | 8b8ae09fcc16cc0522679099728f779e291d959c (tree) |
---|---|
時間 | 2014-04-18 20:28:45 |
作者 | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
Bug 728405 - back-port some bounding box calculation fixes from master
... so that the unit test works without complaints.
@@ -494,7 +494,7 @@ polybezier_bbox(const BezPoint *pts, int numpoints, | ||
494 | 494 | account with the "pointy corners" X (and PS) add when LINEJOIN_MITER mode is |
495 | 495 | in force. */ |
496 | 496 | |
497 | - if ((!start) && (!end)) { /* We have a non-extremity vertex. */ | |
497 | + if (!end) { /* only the last segment might not produce overshoot. */ | |
498 | 498 | Point vpx,vxn; |
499 | 499 | real co,alpha; |
500 | 500 |
@@ -515,7 +515,7 @@ polybezier_bbox(const BezPoint *pts, int numpoints, | ||
515 | 515 | real overshoot; |
516 | 516 | Point vovs,pto; |
517 | 517 | |
518 | - if (finite(alpha)) | |
518 | + if (alpha > 0.0 && alpha < M_PI) | |
519 | 519 | overshoot = extra->middle_trans / sin(alpha/2.0); |
520 | 520 | else /* prependicular? */ |
521 | 521 | overshoot = extra->middle_trans; |