Quote:>Hello,
>I am interested in writing a simple window system, so I'm looking for some
>basics window managing algorithms (windows intersection, clipping,...).
>Does anyone knows if and where I can find some simple code examples (to
>understand the X source code is too hard for me)?
Throughout the 80's, SIGGRAPH course notes (not the papers in the glossy books)
included a number of descriptions of shape algebras. A well equipped
university/college library might still have these.
The key idea is to break the shapes down into horizontal bands, eahc band
consisting of a number of disjoint rectangles, all of equal height. Each
operation steps through the bands of the two shapes being intersected or
whatever, in turn, to produce a new band by interesecting or whatever all the
rectangles in that band. If the bands of the two shapes don't line up to begin
with, then you have to split some of the bands to get a set of natural band
boundaries that are common to both shapes [do this conceptually, not by copying
data!]. It is a lot harder to describe than to actually do, and you might be
better off just drawing lots of diagrams on a sheet of paper:-)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ian Kemmish 18 Durham Close, Biggleswade, Beds SG18 8HZ, UK
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Behind every successful organisation stands one person who knows the secret
of how to keep the managers away from anything truly important.