Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!sdd.hp.com!cs.utexas.edu!mayoff From: mayoff@cs.utexas.edu (Robert Mayoff) Newsgroups: comp.windows.x Subject: Re: How can one create a rounded corner X window? Keywords: round shape Message-ID: <1498@levelland.cs.utexas.edu> Date: 30 May 91 22:30:31 GMT References: Organization: Dept of Computer Sciences, UTexas, Austin Lines: 19 In article 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 /_ Fun things to do with UNIX (#118 in a series): / tail -f super.grow | cat /etc/motd - >> super.grow