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

Home » Public Forums » archive » Position, normal coordinates, and multiple images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Position, normal coordinates, and multiple images [message #87665] Fri, 21 February 2014 10:43 Go to next message
BLesht is currently offline  BLesht
Messages: 89
Registered: March 2007
Member
This question undoubtedly illustrates my failure to understand graphic windows, etc. For an animation I'm working on I want to place two images (identically sized) side by side and leave room on the right for a color bar, on the bottom for a graphical elapsed time indicator, and on the top for other annotations. To do this, I was adapting another code that did the essentially same thing with a single image. My original code used cgImage with the POSITION parameter set to [0.1, 0.1, 0.8, 0.8] and normal coordinates for the color bar and other various annotations. Before I read the explanation of the position math (http://www.idlcoyote.com/tips/vaughan.html) I naively set the position parameter arrays for the two images I wanted side by side to [0.1, 0.1, 0.4, 0.8] and [0.4, 0.1, 0.8, 0.8] respectively which results in the second image being larger (28% of the window) than the the first (21% of the window). Before I go back to using device coordinates to place the two images, I was wondering if someone more clever than I had a suggestion for accomplishing this using normal coordinates.
Re: Position, normal coordinates, and multiple images [message #87667 is a reply to message #87665] Fri, 21 February 2014 10:57 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Barry Lesht writes:

> This question undoubtedly illustrates my failure to understand graphic windows, etc. For an animation I'm working on I want to place two images (identically sized) side by side and leave room on the right for a color bar, on the bottom for a graphical elapsed time indicator, and on the top for other annotations. To do this, I was adapting another code that did the essentially same thing with a single image. My original code used cgImage with the POSITION parameter set
to [0.1, 0.1, 0.8, 0.8] and normal coordinates for the color bar and other various annotations. Before I read the explanation of the position math (http://www.idlcoyote.com/tips/vaughan.html) I naively set the position parameter arrays for the two images I wanted side by side to [0.1, 0.1, 0.4, 0.8] and [0.4, 0.1, 0.8, 0.8] respectively which results in the second image being larger (28% of the window) than the the first (21% of the window). Before I go back to using
device coordinates to place the two images, I was wondering if someone more clever than I had a suggestion for accomplishing this using normal coordinates.

Oh, my God! I forgot to indicate that article was written tongue-in-
cheek. :-)

Yes, your two images were sized differently because the left one used an
X size of three normalize units, and the right one used an X size of
four normalized units. I think if you matched one or the other of these,
you would get *exactly* what you want. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Position, normal coordinates, and multiple images [message #87668 is a reply to message #87667] Fri, 21 February 2014 12:08 Go to previous messageGo to next message
BLesht is currently offline  BLesht
Messages: 89
Registered: March 2007
Member
What?? Tongue in cheek? I thought everything you wrote was to be taken as gospel. I'll give the coordinate change a try.
Re: Position, normal coordinates, and multiple images [message #87669 is a reply to message #87667] Fri, 21 February 2014 12:14 Go to previous message
BLesht is currently offline  BLesht
Messages: 89
Registered: March 2007
Member
Worked perfectly and (now that I think about it) makes sense. Thanks again.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Initialize new variable array with nan or -9999 values
Next Topic: Comparing structures

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

Current Time: Wed Oct 08 11:39:32 PDT 2025

Total time taken to generate the page: 0.00583 seconds