From: "Alan McFarlane" Subject: [Q] Clipping & Overlapping Rectangles Algorithm Newsgroups: comp.os.msdos.djgpp Message-ID: <01bf2c65$c6fdbce0$LocalHost@online-100> X-Newsreader: Microsoft Internet News 4.70.1155 NNTP-Posting-Host: da129d178.dialup.callnetuk.com X-Original-NNTP-Posting-Host: da129d178.dialup.callnetuk.com Date: 11 Nov 1999 16:55:05 GMT X-Trace: 11 Nov 1999 16:55:05 GMT, da129d178.dialup.callnetuk.com Lines: 19 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I'm looking for a set of algorithms to do with rectangles having the following structure: typedef struct { int x, y, w, h; } RECT; 1) How to determine if one rectangle encloses another 2) How to determine if one rectangle overlaps another 3) Assuming an overlap, how to create a series of smaller rectangles that would cover the same area with no overlaps Cheers -- Alan McFarlane amcfarlane AT bigfoot DOT com