Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpfcso!stroyan From: stroyan@hpfcso.HP.COM (Mike Stroyan) Newsgroups: comp.windows.x Subject: Re: Polygon filling and scalable fonts Message-ID: <7320007@hpfcso.HP.COM> Date: 7 May 90 21:53:39 GMT References: <1184@digiw.UUCP> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 28 > If i like to draw O character, it is descripted with two separate > paths or outlines, one outside and one inside. These two are non connected > to each other. In postscript i can use two separate paths and then > fill operator. If i like to use XFillPolygon it does not allow giving > two separate outlines to it. Of course i can do it by drawing inside > path with background color fill, but i like that items drawn back > are still visible from hole like in postscript. You can draw a polygon with a hole in it by sending a self-intersecting polygon. Given the following points- A--------------B | | | E----F I--J | | | | | | | | | | | | | | H----G L--K | | | D--------------C Either close each path and return to the overall initial point between paths, or close each path and back track through the initial points of each path. You can send the sequence of coordinates ABCDAEFGHEAIJKLIA or ABCDAEFGHEIJKLIEA. The X11 definition for polygons is very specific in requiring any path ABA to affect no pixels along on the line between A and B. This works in the both interior and the exterior of polygons. Mike Stroyan, stroyan@hpfcla.hp.com