From owner-freebsd-hackers Wed Oct 2 02:09:28 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA22927 for hackers-outgoing; Wed, 2 Oct 1996 02:09:28 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA22920 for ; Wed, 2 Oct 1996 02:09:26 -0700 (PDT) Received: from isbalham (isbalham.ist.co.uk [192.31.26.1]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id CAA25484 for ; Wed, 2 Oct 1996 02:09:24 -0700 (PDT) Received: from gid.co.uk (uucp@localhost) by isbalham (8.6.12/8.6.12) with UUCP id KAA22628; Wed, 2 Oct 1996 10:05:32 +0100 Received: from [194.32.164.2] by seagoon.gid.co.uk; Wed, 2 Oct 1996 09:43:15 +0100 X-Sender: rb@194.32.164.1 Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 2 Oct 1996 09:43:42 +0100 To: Josh MacDonald From: rb@gid.co.uk (Bob Bishop) Subject: Re: XDrawString Cc: freebsd-hackers@freebsd.org Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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