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

Home » Public Forums » archive » Explicit text formatting for Object Axes
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: Explicit text formatting for Object Axes [message #16895 is a reply to message #16829] Wed, 25 August 1999 00:00 Go to previous messageGo to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
David Fanning wrote:
<blockquote TYPE=CITE>&nbsp;
<p>I would just make sure your axes are scaled into your
<br>view before you muck around with your fonts. This will
<br>ensure that they are scaled "proportionally" to the
<br>axis they are attached to. Then, as you change axis
<br>scaling, these will change too. :-)
<br>&nbsp;
<br>&nbsp;</blockquote>
Oops, I thought that vector drawn fonts were scaled but hardware fonts
<br>were 'hard'.&nbsp;&nbsp; I tinkered with Xplot and can see what you
mean about
<br>needing to have scaleable fonts.&nbsp; Duh!
<p>I've&nbsp; combed through my code regarding axis scaling and can't figure
out what
<br>is going on.&nbsp; The first time I launch the application, the fonts
are
<br>'proportional and quite readable'.&nbsp;&nbsp; If I load a new differently
sized image
<br>into the application the fonts are scaled badly.&nbsp; Now, if I load
a third image of identical size to the very first image the font scaling
returns to its 'proportional and quite readable' scaling.
<p>Below is the code embedded in the event handler that loads a new image.
<p>;
<br>;
<br>;
<br>&nbsp;
<br>&nbsp;
<p>&nbsp;;get the dimensions of the new image called Value
<br>info.Origsz = SIZE(*info.Value, /dimensions)
<br>&nbsp;
<br>&nbsp;; establish the range of values
<br>Xrange = [0,info.Origsz[0]]
<br>Yrange = [0,info.Origsz[1]]
<p>&nbsp;;normalize the range
<br>info.OrigXscale = Normalize(Xrange, position = [0,1])
<br>info.OrigYscale = Normalize(Yrange, position = [0,1])
<p>&nbsp;; make the window slightly larger than the dimensions of the image
<br>xsize = info.Orig_rect[2]*info.Origsz[0]
<br>ysize = info.Orig_rect[3]*info.Origsz[1]
<br>widget_control, info.OrigDrawID, $
<br>&nbsp;xsize =xsize , $
<br>&nbsp;ysize = ysize
<p>&nbsp;; load the new data into the image object with
<br>&nbsp;; the normalized X and Y scaling
<br>info.oOrig -> setProperty, $
<br>&nbsp;Data = *info.image, $
<br>&nbsp;Xcoord_conv = info.OrigXscale, $
<br>&nbsp;Ycoord_conv = info.OrigYscale
<p>&nbsp; ; change the data range and scaling for the X axis
<br>&nbsp;; the Exact keyword has already been set to 1
<br>info.oOrigXaxis1 ->setProperty, $
<br>&nbsp;range = xrange, $
<br>&nbsp;Xcoord_conv = info.OrigXscale
<br>&nbsp;
<p>;
<br>;
<br>;
<p>So, I think I'm setting the axis scaling correctly ... but, clearly,
I am not.
<br>It seems that IDL has developed a scaling memory that I can't override.&nbsp;
gak!
<p>Thanks,
<br>&nbsp;
<p>Ben
<br>&nbsp;
<pre>--&nbsp;
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

Pemaquid River Company
pemaquidriver@tidewater.net</pre>
&nbsp;</html>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl > memory problems
Next Topic: IDL Syntax ?

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

Current Time: Fri Oct 10 07:44:53 PDT 2025

Total time taken to generate the page: 1.68110 seconds