Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 1996 09:43:42 +0100
From:      rb@gid.co.uk (Bob Bishop)
To:        Josh MacDonald <jmacd@cs.berkeley.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: XDrawString
Message-ID:  <v01510101ae77d97e2212@[194.32.164.2]>

next in thread | raw e-mail | index | archive | help
At 7:33 pm 1/10/96, Josh MacDonald wrote:
>[...]
>My results showed that XDrawString on a 2048 character string,
>where only 50 or so are on-screen takes much longer than the same
>call with only the visible length supplied.

This is a well-known problem. When called to investigate a dog-slow X app
one of the first things I check for is drawing to points far off-screen.

>This strikes me as a
>rather stupid way to do things, but thats just an opinion.

You are not alone in this opinion :-)
Basically there's some nasty pathology in a clipping algorithm somewhere in
there.

>The
>problem arises when I draw strings longer than a certain length,
>the text actually wraps around and starts drawing over the previous
>text.  I run Xaccell, so then I tried the same application with an
>XFree86 server, and the string does not draw at all.  On either the
>DEC Ultrix server or Linux Xaccell server I ran it on both displayed
>the string without wrapping.  So I'm curious whats going on.  Here's
>the application.  On the XF86 server it doesn't draw the string, on
>the Xaccell server it wraps the string around, and on Linux and Ultrix
>it works "correctly".  Is the meaning of such a call well defined?

If one end of the long string is far off screen then you will see
pathological (and quite possibly non-portable) behaviour. It's a pain in
the ass, but the only cure I know of is not to draw objects with one end on
screen and the other end far off-screen.


--
Bob Bishop              (0118) 977 4017  international code +44 118
rb@gid.co.uk        fax (0118) 989 4254  between 0800 and 1800 UK





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01510101ae77d97e2212>