JdBP>>> Actually, what I need to do is to write a control window that
JdBP>>> can be used to display coloured text, rather than relying on a
JdBP>>> standard MLE control. I know that these things can be done,
JdBP>>> because programs like ZOC and LiveWire use such controls for
JdBP>>> terminal emulator windows. Does anyone know how they do it ?
JdBP>>> I've tried rolling my own, but it is *very* slow in repainting
JdBP>>> (all of those calls to GpiCharStringPosAt() take a long time).
MR> I can't be sure, because I don't have either program installed, but I
MR> thought both ZOC and LiveWire actually used a VIO window for the
MR> terminal.
MR>
MR> That would mean a bunch of calls to VioSetState() to set the color
MR> registers. It'd probably be more work, but if that's what ZOC and
MR> LiveWire used, it must be faster.
In the case of PM, a VIO presentation space is simply a handy way of not
having to do the raw character painting onesself. Unfortunately, in a pure
32-bit application the option of a VIO presentation space is not open to me.
So I'm looking for an efficient way of drawing characters to a presentation
space during a WM_PAINT event myself. I've constructed a logical screen
buffer, containing the character and attribute pairs, and I want to repaint
the presentation space as appropriate whenever a WM_PAINT comes along. I used
GpiCharStringPosAt(), but it is very slow when drawing a single character at a
time. Unfortunately, I have to draw single characters at a time when it is
the case that successive characters have different foreground and background
colours.
There must *be* a way to do this, because the VIO library seems to draw
characters (taken from its logical character/attribute video buffer) onto a
presentation space very rapidly. I was hoping that someone would know what it
is.
¯ JdeBP ®
--- FleetStreet 1.22 NR
* Origin: JdeBP's point, using Squish (2:257/609.3)
|