[haiku-development] Re: RoundRect ButtonFrame

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 24 Mar 2012 05:21:24 -0400

On Sat, Mar 24, 2012 at 4:25 AM, John Scipione <jscipione@xxxxxxxxx> wrote:
> StrokeRoundRect() seems to work with a 0 radius to stroke a regular
> rectangle. However, I am seeing a problem where the outside edge of
> the default indicator roundrect is now getting drawn correctly. It is
> like there are transparent pixels there. Some sort of clipping
> problem.

I solved this problem, I filled in the whole rect with the background
color. I realize now that the reason it was messing up was because I
wasn't drawing in the areas where StrokeRoundRect() didn't touch
anywhere. This wasn't a problem for StrokeRect(). Note that I am
taking into account any clipping constrains set before calling this
method.

>> Well, there may be a problem with that. The intention was that the "frame"
>> only includes the dark border and anything outside of that. While the
>> background includes the very slight inner bevel. You can see the problem
>> already in your screen shot with the scroll bars. Those look different now
>> (missing the bevel). I haven't thought about what the best solution would
>> be.

The scrollbar in this image (before my changes but fairly recent)
doesn't seem to have a bevel to me.

http://api.haiku-os.org/keymap.png

Am I missing something?

Other related posts: