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

Home » Public Forums » archive » Re: determining postition on image?
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
Re: determining postition on image? [message #5138] Tue, 03 October 1995 00:00
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <vohh1rbxd8.fsf@revelle.cdc.noaa.gov>, cas@revelle.cdc.noaa.gov (Cathy Smith) writes:
>
> Is it possible to determine where one is on a gif image after one
> draws a character string automatically? That is, w/o interactively
> using the CURSOR command? What I am doing is writing a character
> string on a gif file in helvetica font. I'd like to return what
> pixels on the gif are covered by a rectangle surrounding the character
> string. Unfortunately, it doesn't appear that letters in helvetica are
> the same width so I can't simply calculate the pixel length based on the
> length of the character string.
>
> Another possibility might be to calculate somehow how long a string is
> in a certain font but I don't know how to do that either.
>

The XYOUTS routines takes a WIDTH keyword which returns the actual width of the
character string in normalized coordinates. This can be converted to device
coordinates with convert_coord. This should let you calculate what you need to
know.

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Q: is there a radiative transfer code written in IDL
Next Topic: random number trap

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

Current Time: Wed Oct 08 19:13:23 PDT 2025

Total time taken to generate the page: 0.00526 seconds