[haiku-development] Re: RoundRect ButtonFrame

Am 24.03.2012 10:21, schrieb John Scipione:
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.

I don't know what you mean. StrokeRect() always touches the corner pixels, while StrokeRoundRect() most likely doesn't if the radius is large enough.

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?

I am clearly seeing the bevels on the arrow buttons and the thumb. Just make a screen shot before and after your changes and toggle between them. It should become obvious then.

Best regards,
-Stephan

Other related posts: