summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-09-24 14:57:05 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-09-24 14:57:05 (GMT)
commit24ac21d13387442aa78e09f02e3b9735ca2e80a5 (patch)
tree4419180890358f5b8245120b08e4222ccb19b112 /tests
parentb342e4e5c5a95c89cc56ac49ac68ab68e9475076 (diff)
parent1cf84307c36457315f7106a4fbf8589543d049f9 (diff)
downloadtk-24ac21d13387442aa78e09f02e3b9735ca2e80a5.zip
tk-24ac21d13387442aa78e09f02e3b9735ca2e80a5.tar.gz
tk-24ac21d13387442aa78e09f02e3b9735ca2e80a5.tar.bz2
Fix [514ff64dd0]: canvas rotated text overlap detection not working.
Diffstat (limited to 'tests')
-rw-r--r--tests/font.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/font.test b/tests/font.test
index 23e09c4..62afa5a 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -1956,6 +1956,16 @@ test font-31.6 {Tk_IntersectTextLayout procedure: ignore spaces at eol} -body {
.t.c itemconfig text -width 0
return $x
} -result {}
+test font-31.7 {TkIntersectAngledTextLayout procedure: bug [514ff64dd0]} -body {
+ csetup "This is line one\nand line two\nand line three here"
+ .t.c itemconfigure text -angle 90
+ # Coordinates of the rectangle to check can be hardcoded:
+ # The goal of this test is to check whether the overlap detection algorithm
+ # works when the rectangle is entirely included in a chunk of the text layout.
+ # The text has been rotated 90 degrees around it's upper left corner,
+ # so it's enough to check with a small rectangle with small negative y coords.
+ .t.c find overlapping 5 -7 7 -5
+} -result {1}
destroy .t.c