| Ticket UUID: | 2328657 | |||
| Title: | test failures | |||
| Type: | Bug | Version: | obsolete: 8.6a4 | |
| Submitter: | dgp | Created on: | 2008-11-22 20:31:55 | |
| Subsystem: | 05. Canvas Items | Assigned To: | ferrieux | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2026-10-22 17:22:35 | |
| Resolution: | Fixed | Closed By: | serhiy.storchaka | |
| Closed on: | 2026-09-25 08:31:15 | |||
| Description: |
not certain, but I think these
are new:
==== canvText-18.1 bug fix 2525, find enclosed on text with newlines FAILED
==== Contents of test case:
pack [canvas .c]
.c create text 100 100 -text Hello\n -anchor nw
set bbox [.c bbox 1]
set x2 [lindex $bbox 2]
set y2 [lindex $bbox 3]
incr y2
update
.c find enclosed 99 99 [expr $x2 + 1] [expr $y2 + 1]
---- Result was:
---- Result should have been (exact matching):
1
==== canvText-18.1 FAILED
==== canvText-20.1 angled text bounding box FAILED
==== Contents of test case:
.c create text 2 2 -tag t -anchor center -text 0 -font {Helvetica 24}
set bb0 [.c bbox t]
.c itemconf t -angle 90
set bb1 [.c bbox t]
.c itemconf t -angle 180
set bb2 [.c bbox t]
.c itemconf t -angle 270
set bb3 [.c bbox t]
list [expr {$bb0 eq $bb2 ? "ok" : "$bb0,$bb2"}] [expr {$bb1 eq $bb3 ? "ok" : "$bb1,$bb3"}] [expr {$bb0 eq [transpose $bb1] ? "ok" : "$bb0,$bb1"}]
---- Result was:
{-7 -22 12 27,-8 -23 11 26} {-22 -8 27 11,-23 -7 26 12} {-7 -22 12 27,-22 -8 27 11}
---- Result should have been (exact matching):
ok ok ok
==== canvText-20.1 FAILED
| |||
| User Comments: |
serhiy.storchaka added on 2026-09-25 08:31:15:
canvText-18.1 was fixed in 8.6.0 by [6c007ba101]; canvText.test now passes on main and 8.6. The remaining "find enclosed" problem with empty text items is [3611174fff]. Closing. dgp added on 2013-04-29 21:55:25: see 3611174 ferrieux added on 2009-07-22 22:07:55: Hmm, the change I committed solves the problem but in too brutal a fashion. It now collapses Hello\n to the same vertical size as Hello (ie half) for the enclosure computation. Reconsidering it. Braindump: those zero-width chunks should not be ignored altogether, but their semantics is tricky. If they exactly coincide with one edge of the enclosure-check rectangle, should they be considered inside, outside, or "don't weigh on collective decision" ? ferrieux added on 2009-07-15 03:49:02: Oh gosh this slipped completely out of my cache :-} Allow for a short pagein delay... dkf added on 2009-07-13 19:50:31: I don't thoroughly understand what your proposed solution is (sorry!) so I'm going to let you have a go at it... ferrieux added on 2008-11-24 06:58:21: Hmm, ->x2 should be 1 not -1 for the trick to work. Anyway, the alternative remains. ferrieux added on 2008-11-24 06:54:27: First one is an off-by-one error on test "left>=x2" at line 2915 of tkFont.c for the special layout chunk of size zero: if ((right < x1) || (left >= x2) Here left==0 *and* x2 too (by construction of such chunks). Maybe zeroChunkPtr->x2 should be -1. Alternatively, maybe checks on X axis should be skipped for those chunks (ie when numDisplayChars==-1). Donal ? | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki