
A region is used as the term to describe a set of rectangles -- e.g. could be as simple as std::vector<rectangle>. When working with regions, one often needs to perform various operations like finding the intersection of two regions, the union, subtract one region from another or xor two regions (which is the union minus the intersection). I would like to know if there is a) any interest in such a library and/or b) if such a library already exists? I figure the usefulness of such a library mostly has to do with optimizing (and clipping) refresh in a graphical view port, which is often something the operating system takes care of. And thus user code rarely has to deal with these things.

"Allan Odgaard" <ML@Top-House.DK> wrote in message news:10CB19FE-827D-11D8-9A67-00039351BBEE@Top-House.DK...
I figure the usefulness of such a library mostly has to do with optimizing (and clipping) refresh in a graphical view port, which is often something the operating system takes care of. And thus user code rarely has to deal with these things.
Are you suggesting that the library would be useful mostly to people writing operating systems? Jonathan

On 30. Mar 2004, at 21:22, Jonathan Turkanis wrote:
I figure the usefulness of such a library mostly has to do with optimizing (and clipping) refresh in a graphical view port, which is often something the operating system takes care of. And thus user code rarely has to deal with these things. Are you suggesting that the library would be useful mostly to people writing operating systems?
Yes -- although I personally do need it even when I do not write operating systems ;) and thus my question really was if there is any general interest in such a library, since I did exhaustive searching and was only able to find such region stuff implemented publicly in the GDK/GTK library, which is ANSI-C AFAICT, and that led me to the conclusion that either there is no real use for this stuff outside GUI kits, windowing systems, and 2D games or efficient region "logic" is often skipped for ad hoc workarounds like using bounding boxes or refreshing more than necessary -- in which case there really ought to be a library.

On 30. Mar 2004, at 21:22, Jonathan Turkanis wrote:
I figure the usefulness of such a library mostly has to do with optimizing (and clipping) refresh in a graphical view port, which is often something the operating system takes care of. And thus user code rarely has to deal with these things. Are you suggesting that the library would be useful mostly to
writing operating systems?
Yes -- although I personally do need it even when I do not write operating systems ;) and thus my question really was if there is any general interest in such a library, since I did exhaustive searching and was only able to find such region stuff implemented publicly in
"Allan Odgaard" <ML@Top-House.DK> wrote in message news:C20B6DFC-8290-11D8-9A67-00039351BBEE@Top-House.DK... people the
GDK/GTK library, which is ANSI-C AFAICT, and that led me to the conclusion that either there is no real use for this stuff outside GUI kits, windowing systems, and 2D games or efficient region "logic" is often skipped for ad hoc workarounds like using bounding boxes or refreshing more than necessary -- in which case there really ought to be a library.
I just realized I have a user interface project which has been on the back burner for a long time which could really use a library like this. So yes -- I'm interested! Jonathan

"Allan Odgaard" <ML@Top-House.DK> wrote in message news:C20B6DFC-8290-11D8-9A67-00039351BBEE@Top-House.DK...
[...] and that led me to the conclusion that either there is no real use for this stuff outside GUI kits, windowing systems, and 2D games or efficient region "logic" is often skipped for ad hoc workarounds like using bounding boxes or refreshing more than necessary -- in which case there really ought to be a library.
Perhaps an OSS library similar to DirectX? I know there's OpenGL, but that seemed more focused on 3D last time I looked at it. I think there's still enough 2D applications that such a library would be useful (especially as a low-level implementation library for the GUI libraries being floated around here). Dave --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.581 / Virus Database: 368 - Release Date: 2/9/2004

Allan Odgaard writes: [...]
operating systems ;) and thus my question really was if there is any general interest in such a library, since I did exhaustive searching and was only able to find such region stuff implemented publicly in the GDK/GTK library, which is ANSI-C AFAICT, and that led me to the [...]
FWIW: Qt also implements a region, named QRegion, which is used for QPaintEvents: http://doc.trolltech.com/3.3/qregion.html Regards, Rogier

On 31. Mar 2004, at 10:40, Rogier van Dalen wrote:
FWIW: Qt also implements a region, named QRegion, which is used for QPaintEvents: http://doc.trolltech.com/3.3/qregion.html
Thanks for the link, this is more or less what I was proposing/requesting. I took a look at the source, and interestingly it is based more or less directly on the X11 source (but with a nice wrapper class), which Graydon also referred to. So it would seem that there almost is some sort of de facto standard ;)
participants (4)
-
Allan Odgaard
-
David B. Held
-
Jonathan Turkanis
-
Rogier van Dalen