[comp.sys.mac.programmer] How round are dialog corners?

mcdonald@fornax.UUCP (Ken Mcdonald) (03/08/90)

REAL simple question.  What formula does the control manager use to
decide how round the corners of standard buttons should be?

Thanks,
Ken McDonald

keith@Apple.COM (Keith Rollin) (03/09/90)

In article <407@fornax.UUCP> mcdonald@fornax.UUCP (Ken Mcdonald) writes:
>REAL simple question.  What formula does the control manager use to
>decide how round the corners of standard buttons should be?
>

The sources to our system defprocs are posted to our ftp site, so you can look 
at what formula it uses there. If that's not what you exactly had in mind, 
then...

Inside Macintosh recommends that you use a diameter of 16 when calling
FrameRoundRect (if, for example, you wanted to frame a default button). This
looks OK for normal sized buttons, but looks really awful for larger buttons.
So I looked it up, and this is what I found. The system CDEF for drawing
simple push buttons takes the height of the button, divides it by 2, and uses
that as the diameter. I tried this out, and it works pretty well.

-- 
------------------------------------------------------------------------------
Keith Rollin  ---  Apple Computer, Inc.  ---  Developer Technical Support
INTERNET: keith@apple.com
    UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith
"Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions