gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Floating point rounding errors in NSTableView?


From: Alessandro Sangiuliano
Subject: Re: Floating point rounding errors in NSTableView?
Date: Tue, 30 Jun 2015 12:34:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hello, the same problem happened here time ago. I was implementing a System Monitor similar to the OS X one. So an NSTableView to show processes, to track the cpu usage and so on. I never reported because I thought it was my fail.

Il 30/06/2015 11:43, Matt Rice ha scritto:
On Mon, Jun 29, 2015 at 8:07 AM, David Chisnall <address@hidden> wrote:
Hi all,

I have an application that uses an NSTableView to display a CPU trace.  After 
about 10,000,000 rows, it’s quite obvious that something is wrong with the 
rendering - about every 15 rows, there’s a blank line between adjacent rows.  
By around 15,000,000 it looks as if there’s a blank line between every other 
line, and some rows are drawn on top of each other.

By row 100,000,000, every row in a group (height *1.5ish?) is drawn on top of 
each other one.

It looks as if there is some floating point rounding happening that’s causing 
the offset calculation to go wrong?

David

P.S. On OS X, the display does not have these problems, though OS X’s 
NSTableView gets very confused by input events when you scroll beyond about row 
100,000,000...
is it apparent in the return value of -[NSTableView rectOfRow:] for
the afflicted rows? _rowHeight contributing to the rect.origin.y seems
to be a float rather than CGFloat?

_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]