Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spindly text

2 views
Skip to first unread message

Dave Higton

unread,
Dec 31, 2009, 5:50:28 PM12/31/09
to
I'm redrawing a window with spindly text. I swear that this same
code worked earlier today...

Partial screen shot is at http://www.apts04.dsl.pipex.com/Others/screen.zip
(roughly 320 KB, containing a ~2 MB sprite) which shows one window where
the text is fine and one where it's not.

The window in question is not auto-redraw. Its work background colour
is 1 and foreground 7. The text is being drawn by the following code:

SYS Wimp_TextOp%, 0, 7, 1
SYS Wimp_TextOp%, 2, FNobject_format_string(object_type%(i%)), -1, -1, x% + tab0%, y%
SYS Wimp_TextOp%, 2, object_creation_date$(i%), -1, -1, x% + tab1%, y%
SYS Wimp_TextOp%, &80000002, STR$(object_bytes%(i%)), -1, -1, x% + tab2%, y%
SYS Wimp_TextOp%, 2, object_name$(i%), -1, -1, x% + tab3%, y%

within a typical redraw loop. Clearly I'm using the Wimp desktop
font (Homerton.Medium, 12 pt), and clearly it's being redrawn
elsewhere entirely happily. Anything that's horizontal or vertical
appears to come out OK, it's the sloping or rounded bits that come
out thin and jagged. I'm not aware of any control strings in any
strings that are being drawn. There shouldn't be any. There appears
to be no mismatch between the fg/bg colours of the text drawing
operation and the window work area.

Where I set strings into icons and let the Wimp redraw it, they are
fine; the one window that's wrong is the one I have to redraw myself.

Can anyone spot what I've done wrong or failed to do, please?

Dave

Christopher Bazley

unread,
Dec 31, 2009, 9:41:39 PM12/31/09
to
On Dec 31 2009, 10:50 pm, Dave Higton <davehig...@dsl.pipex.com>
wrote:

> I'm redrawing a window with spindly text.  I swear that this same
> code worked earlier today...
>
> Partial screen shot is athttp://www.apts04.dsl.pipex.com/Others/screen.zip

> (roughly 320 KB, containing a ~2 MB sprite) which shows one window where
> the text is fine and one where it's not.
>
> The window in question is not auto-redraw.  Its work background colour
> is 1 and foreground 7.  The text is being drawn by the following code:
>
> SYS Wimp_TextOp%, 0, 7, 1

I haven't seen your screenshot, but that SWI doesn't take Wimp colour
numbers; it takes 24 bit palette entries (0xBbGgRr00 format). To do
what you want, you need to use it in conjunction with SWI
Wimp_ReadPalette.

HTH,
--
Christopher Bazley

Dave Higton

unread,
Jan 1, 2010, 9:27:10 AM1/1/10
to
In message <a4c1b5d5-d01a-4c8f...@a15g2000yqm.googlegroups.com>
Christopher Bazley <cs9...@gmail.com> wrote:

Of course. Thanks, Chris.

Dave

0 new messages