ayee@coyote.datalog.com (allen yee) (05/30/91)
I am having problem figureing out a problem. How can one create a rounded corner X window? I know it can be done because I saw it in OpenLook, but this is for a button. I would like a rounded corner for Motif. Any suggestion would help. Thanks in advance. ayee
mayoff@cs.utexas.edu (Robert Mayoff) (05/31/91)
In article <uokq31w163w@coyote.datalog.com> ayee@coyote.datalog.com (allen yee) writes: >How can one >create a rounded corner X window? I know it can be done because >I saw it in OpenLook, but this is for a button. I would like a >rounded corner for Motif. Any suggestion would help. Well, this isn't a Motif-specific solution, but you said any suggestion would help. What I'd do is create a bitmap (a one-plane pixmap) and use XmuFillRoundedRect to create a rounded rectangle in it. Create another bitmap and copy the first into it, then use XmuDrawRoundedRect to erase the border of the rounded rectangle (you'd have to use a GC with the appropriate draw function - GXandInverted, I think), leaving the interior. Use the shaped-window extension (assuming your server supports it) to set the bounding mask of your window to the first bitmap and the clip mask to the second. -- /_ rob <mayoff@cs.utexas.edu> /_ Fun things to do with UNIX (#118 in a series): / tail -f super.grow | cat /etc/motd - >> super.grow