FROM : Matteo Manferdini
DATE : Sun Jul 23 17:29:36 2006
Il giorno 23/lug/06, alle ore 03:10, Michael Ash ha scritto:
> This generally happens when you have non-integral coordinates. Go
> through and see if any of your view coordinates have non-integral
> coordinates (check them in the window's coordinate space, if you're
> doing any scaling or anything like that).
>
Yes, the width of the subview is 2/3 of the enclosing view. I thougt
about this, but I wasn't sure this was the reason.
> When your views' boundaries
> don't fall exactly on pixel boundaries it confuses the fancy pixel
> copiers used for scrolling and things like this happen. Whether it's a
> bug or not depends on your position, I suppose, but in any case it's
> fairly well-known.
>
I don't know if that can be considered a bug, but I think that apple
should include in the docs a little warning on misbehaviour with non
integral values. If it's documented, it's not a bug :) ("Hey, there's
a bug!". "No, it's a software feature!).
> To fix it, you can make sure all of your coordinates are integral.
> NSIntegralRect() can come in handy here. Or you can disable the
> copying behavior by doing a setCopiesOnScroll:NO, this will cause the
> entire contents to be redrawn when scrolled, which harms efficiency
> but stops these sorts of artifacts.
>
Thank you very much for the advice.
---
Matteo Manferdini
DATE : Sun Jul 23 17:29:36 2006
Il giorno 23/lug/06, alle ore 03:10, Michael Ash ha scritto:
> This generally happens when you have non-integral coordinates. Go
> through and see if any of your view coordinates have non-integral
> coordinates (check them in the window's coordinate space, if you're
> doing any scaling or anything like that).
>
Yes, the width of the subview is 2/3 of the enclosing view. I thougt
about this, but I wasn't sure this was the reason.
> When your views' boundaries
> don't fall exactly on pixel boundaries it confuses the fancy pixel
> copiers used for scrolling and things like this happen. Whether it's a
> bug or not depends on your position, I suppose, but in any case it's
> fairly well-known.
>
I don't know if that can be considered a bug, but I think that apple
should include in the docs a little warning on misbehaviour with non
integral values. If it's documented, it's not a bug :) ("Hey, there's
a bug!". "No, it's a software feature!).
> To fix it, you can make sure all of your coordinates are integral.
> NSIntegralRect() can come in handy here. Or you can disable the
> copying behavior by doing a setCopiesOnScroll:NO, this will cause the
> entire contents to be redrawn when scrolled, which harms efficiency
> but stops these sorts of artifacts.
>
Thank you very much for the advice.
---
Matteo Manferdini
| Related mails | Author | Date |
|---|---|---|
| Matteo Manferdini | Jul 22, 17:18 | |
| Shawn Erickson | Jul 22, 17:37 | |
| Michael Ash | Jul 23, 03:10 | |
| R. Tyler Ballance | Jul 23, 03:42 | |
| Matteo Manferdini | Jul 23, 17:29 | |
| Michael Ash | Jul 23, 23:16 |






Cocoa mail archive

