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

Home » Public Forums » archive » Re: idl8 window size and arrow
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: idl8 window size and arrow [message #84480] Fri, 24 May 2013 05:01 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le jeudi 23 mai 2013 19:14:27 UTC+2, Mike Galloy a écrit :
> On 5/22/13 9:28 PM, laoli wrote:
>
>> Many thanks Mike. Your explanation about different graphics is greatly helpful.
>
>>
>
>> 1) I added your line of code
>
>> ar = arrow([50, 200], [50, 50], /device, head_size=3.)
>
>> to my test script.
>
>>
>
>> 1a), the word "arrow" does not change color as other function names do.
>
>
>
> I does not in the IDL 8.2.2 Workbench either. This looks like a bug in
>
> the Workbench.
>

On my machine, I can.
{ x86_64 Win32 Windows Microsoft Windows 8.2.2 Jan 23 2013 64 64}

>
>> 1b), when running it, an error message appeared:
>
>> Unable to invoke method on NULL object reference: <OBJREF (<NullObject>)>.
>
>
>
> I can't reproduce that error in the Workbench or from the command line
>
> (the widget system used for function graphics is different in these cases).
>
I agree.
>
>> 1c), when commented out your line of code, and used the Annotate tools provided at the bottom of the graphic window, all other tools (such as Text, Oval) worked fine, but the Arrow tool caused an error message:
>
>> Unable to locate target descriptor: MANIPULATORS/ANNOTATION/ARROW
>
>
>
> I also couldn't get that to happen.
>
I have *no* problem in adding arrow with Annotate button.
>
>> 2) The window size is a problem on my machine:
>
>> { x86_64 Win32 Windows Microsoft Windows 8.0.1 Oct 5 2010 64 64}
>
>
>
> But I did have problems (depending on Workbench/command line):
>
>
>
> a) From the Workbench, I could not get the window to be only 100
>
> pixels tall. But at least coordinates seemed correct.
>

It seems to be some limit on minimal window size one can create from the Workbench: 484 x 335 on my machine, whatever smaller dimensions are asked.

From IDL Command line I can get a smaller (100 x 100) window but the window frame around the 100 x 100 drawing surface is enlarged in order that all icons at bottom can be displayed.

In addition, the couple of statements:
w = window(window_title="My window", dimensions=[500, 100])
ar = arrow([50, 200], fltarr(2) + 200., /device, head_size=3.)
creates, in case of the IDL Command line, a window of correct size but, of course, the arrow at Y-position 200, while window height is only 100 pixels, is likely clipped.

>
> b) From the command line, the coordinate system is screwed up. The
>
> window shows up as 100 pixels tall, but to get the arrow and text to
>
> appear in the window, I had to position them at over 100 pixels (200
>
> pixels appeared to be the center of the window, making the device
>
> coordinates of the window start at 150 and go up to 250).
>
>
>
> Here is the code I was using:
>
>
>
> pro mg_arrow_test
>
> w = window(window_title="My window", dimensions=[500, 100])
>
> t = text(50, 220, "$\it draw arrow here$", /device)
>
> ar = arrow([50, 200], fltarr(2) + 200., /device, head_size=3.)
>
> end
>
>
>
>
>
> Mike
>
> --
>
> Michael Galloy
>
> www.michaelgalloy.com
>
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
>
> Research Mathematician
>
> Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: minimization method(amoeba subroutine)
Next Topic: True-Type Font Confusion

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

Current Time: Wed Oct 08 13:36:38 PDT 2025

Total time taken to generate the page: 0.00420 seconds