| Ticket UUID: | 2857300 | |||
| Title: | Tk_MeasureChars rounding error | |||
| Type: | Bug | Version: | obsolete: 8.6b1 | |
| Submitter: | treectrl | Created on: | 2009-09-12 01:05:06 | |
| Subsystem: | 45. Aqua Fonts | Assigned To: | das | |
| Priority: | 9 Immediate | Severity: | ||
| Status: | Closed | Last Modified: | 2011-06-10 03:25:13 | |
| Resolution: | Accepted | Closed By: | dgp | |
| Closed on: | 2011-06-09 20:25:13 | |||
| Description: |
In tkMacOSXFont.c the lround() function is used to convert double -> integer. The problem is that lround() will round to the *nearest* integer. So lround(10.2) equals 10 while lround(10.6) equals 11. Since the width of the text is needed, ceil() should be used to round up fractional numbers. | |||
| User Comments: |
dgp added on 2011-06-10 03:25:13:
allow_comments - 1 dgp added on 2011-06-10 03:25:12: Seems these are Cocoa bug fixes. Do not backport to Tk 8.5, which is Carbon only. If that's not right, someone please correct and reopen for backport. hobbs added on 2011-06-10 02:56:35: Appears several 2011-01-06 head commits were not backported to 8.5, including this one. hobbs added on 2011-06-10 01:33:02: allow_comments - 0 Yes, we had to backport this to 8.5, otherwise treectrl exhibits some odd trimming behavior, which turned out to be this core issue. dgp added on 2011-06-10 01:30:27: Need an 8.5.10 backport? wordtech added on 2011-01-06 07:05:24: allow_comments - 1 Fix committed. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki