| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | terminal emualtor class |
-=> Quoting Peter Fitzsimmons to Phil Crown <=-
PC> For example, how does a color syntax-highlighting editor know to print
PC> a word in blue in the middle of the page, and print everything before
PC> and after it in different colors (and then be able to scroll it off and
PC> back onto the screen.
PF> I recently had to code something like this (it was for printing, not
PF> for displaying -- the the issue was not colours but different fonts
PF> (which is even worse than colours because the fonts can have a
PF> different highest, yet still be in the same line).
PF> What I had to do was loose the concept of a "line", and
work with a
PF> linked-list of "text runs". A line becomes a linked-list
of runs (the
PF> line ends when the list ends).
PF> Each run has a style (part of which can be colour), typeface, x
PF> coordinate, and pel-width. The pel-height has to be calculated by
PF> scanning the whole run to find the tallest font.
Thanks for the ideas. I'll see what I can do. :-)
Phil Crown pcrown{at}airmail.net http://web2.airmail.net/pcrown/
--- Blue Wave/OS2 v2.30
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 972-250-4479 * (1:124/1208)SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 124/1208 1 396/1 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.