diff options
author | fvogel <fvogelnew1@free.fr> | 2017-09-24 14:57:26 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-09-24 14:57:26 (GMT) |
commit | 463704658db3688e38b70e8ba372e40de589f1fd (patch) | |
tree | 975da6bef35548ca049a5689289fc9a74413ccde /generic/tkFont.c | |
parent | 0736f1be01bbab1e149695436e851c304867cbb4 (diff) | |
parent | 77ed324954725331597e86d2f066e38f08b9093c (diff) | |
download | tk-463704658db3688e38b70e8ba372e40de589f1fd.zip tk-463704658db3688e38b70e8ba372e40de589f1fd.tar.gz tk-463704658db3688e38b70e8ba372e40de589f1fd.tar.bz2 |
Fix [514ff64dd0]: canvas rotated text overlap detection not working.
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r-- | generic/tkFont.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index 3c2b4f9..fbf5445 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -3146,14 +3146,13 @@ TkIntersectAngledTextLayout( cy[0] = cy[1] = chunkPtr->y - fontPtr->fm.ascent; cx[1] = cx[2] = chunkPtr->x + chunkPtr->displayWidth; cy[2] = cy[3] = chunkPtr->y + fontPtr->fm.descent; - if ( !PointInQuadrilateral(cx, cy, rx[0], ry[0]) || - !PointInQuadrilateral(cx, cy, rx[1], ry[1]) || - !PointInQuadrilateral(cx, cy, rx[2], ry[2]) || - !PointInQuadrilateral(cx, cy, rx[3], ry[3])) { - goto notReverseInside; - } + if ( PointInQuadrilateral(cx, cy, rx[0], ry[0]) && + PointInQuadrilateral(cx, cy, rx[1], ry[1]) && + PointInQuadrilateral(cx, cy, rx[2], ry[2]) && + PointInQuadrilateral(cx, cy, rx[3], ry[3])) { + return 0; + } } - return 0; /* * If we're overlapping now, we must be partially in and out of at least @@ -3161,7 +3160,6 @@ TkIntersectAngledTextLayout( * rectangle that is touching or crossing a line segment of a chunk. */ - notReverseInside: chunkPtr = layoutPtr->chunks; for (i=0 ; i<layoutPtr->numChunks ; i++,chunkPtr++) { |