[haiku-development] Re: RoundRect ButtonFrame

  • From: Joseph Groover <looncraz@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 20 Mar 2012 17:01:33 -0500

On 3/20/2012 14:30, John Scipione wrote:
I am coming across an issue where sometimes the corner is off by 1 horizontally from the rest of the button when the buttons get resized. See the screenshot below to see what is happening: http://imagebin.org/204404 (I haven't implemented the bottom corners yet) I am not quite sure what to make of this, perhaps some rounding issue that I am not taking into account somewhere. It only appears to happen when buttons get resized, a fixed button never encounters the issue. Any ideas as to what could be causing this? Thanks, John Scipione

I believe that is an app_server bug, actually. I've come across +/-1 errors in many cases, and some outright ugly clipping failures when working with the drawing code (decorators, bitmap painting).

For instance, my thumbnail generator test unit code (which worked perfect on BeOS) paints a 128x128 thumbnail into a centered rect, then strokes that same rect.. in Haiku, the stroked rect is *normally* off-by-one... even though the rect is the same. Resizing the window changes the rect, and the error goes away until I resize it again.

I haven't examined to see if the problem is in the painting of the BBitmap or the stroking of the BRect. My feelings is that, considering you are possibly seeing the same issue, it is in the stroking of the rect... certainly an odd bug... and one deep in app_server's painter, no doubt...

--The loon

Other related posts: