delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/12/14:30:51

Message-Id: <m10WlTO-000S8MC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Jonathan Gross <jgross AT ort DOT org DOT il>, djgpp AT delorie DOT com
Date: Mon, 12 Apr 1999 15:34:42 +0000
MIME-Version: 1.0
Subject: Re: Urgent ! help in windowing system.
In-reply-to: <3711BAD9.6F0A730C@ort.org.il>
X-mailer: Pegasus Mail for Windows (v2.54)
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Jonathan Gross <jgross AT ort DOT org DOT il> asked:

> I am building an MS-DOS windowing system with DJGPP.
> I need a way to draw all windows without drawing them one on
> top of the other but only where needed.
> any help is very appreciated!

Well, the solution depends on your architecture. Here is more or less what 
Turbo Vision does:
For each character of a window that will be drawed TVision checks in the list 
of windows (that's Z axis sorted) if any other window overlaps, if no overlap 
then the content of this window is used. To speed up the things Turbo Vision 
does it with lines and uses a recursive methode to break the lines in 
segments when other window overlap partially. 
The mechanism is relative complex and to make it worst windows have shadows 
;-). As the original algorithm was in assembler the Robert's adaptation is 
just a mess. I have an implementation in C++ that does the work for one 
character in the screen, I use it for other class called TViewPlus, but you 
can see how the line optimization works in this example. 
Basically the optimization looks if other object is over the line, it can 
hide the whole line (not drawing) or: the left part or the right part or just 
be in the middle, in any of these cases the routine is called recursivelly to 
solve the part/s that can be hided by the next object. When you reach the top 
off the list of objects the recursion ends and you start drawing.

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(5411) 4759 0013

- Raw text -


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