comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: al_legend producing an unwanted circle
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: al_legend producing an unwanted circle [message #79093 is a reply to message #79086] Thu, 26 January 2012 10:45 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Wolven writes:

> Generally when the observer influences the outcome it means that quantum mechanical phenomena are involved. ;)

Yes, I think that is what is going on here! ;-)

OK, I am not *exactly* sure what is going on here, but
here is what I know about the problem.

The problem occurs on line 485 of AL_Legend, the
second of two calls to cgText that are close to one
another. If I put a breakpoint on that line and step
over it, the circle appears. If I put a breakpoint
on that line and step into cgText, the circle never
appears. (One of the mysteries, I suppose!)

In any case, the "problem" appears to be in cgText
on or about line 220 in which I am trying to return
the normalized width of the text. I know this because
if I take all those lines out and just return a fake
width, the circle never appears.

OK, so. Following the directions in the IDL on-line
help, I create a pixmap of the appropriate size
and draw my text there to get the width. This works
perfectly, but somehow causes a circle to appear in the
current graphics window. This happens NO MATTER what
window I make the current graphics window before
I create the pixmap. I conclude from this that it
is some kind of bug in the internal IDL code. I
don't know what else it could be.

To fix this problem, I modified cgText so that I no
longer create a pixmap. Rather, I just add the
cgText command to the cgWindow and draw momentarily
into the cgWindow. No harm is really done here, since
this is not the command that will *actually* appear
in cgWindow, and I am drawing it in the background
color in any case, so it is even less intrusive.
(I had to make a change in cgcmdwindow__define, since
this tickled a typo bug there that was preventing me
from obtaining the window background color.)

So, bottom line, you probably want to update your
Coyote Library, or (at the very least) your
cgText program.

http://www.idlcoyote.com/programs/cgtext.pro
http://www.idlcoyote.com/programs/zip_files/coyoteprograms.z ip

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI
Next Topic: list trouble

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 21:35:21 PDT 2025

Total time taken to generate the page: 1.04150 seconds