www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/11/12:01:32

From: "Alan McFarlane" <amcfarlane AT bigfoot DOT com>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019