Re: IDL and X and PS [message #594 is a reply to message #593] |
Wed, 16 September 1992 08:59   |
zawodny
Messages: 121 Registered: August 1992
|
Senior Member |
|
|
The real difficulty in trying to implement a WYSIWYG program in IDL/
WAVE between an X-window view and a Postscript output has to do with several
factors. Using the /NORMAL keyword may help a little but it is not the
solution. Recall that the plot box (defined by !p.clip) is determined by the
font size and x(y).margin variables (Yes, you can also get at it with !p.region
or !p.position as well). So when you shift between devices, you naturally
shift between fonts, font sizes, and hardware vs software fonts. A change in
any of these will, typically, alter where a xyouts will place a string relative
to the plot box and or the relative size of the string. Additionally there is
the difficulty of getting the aspect ratios (x dimension / y dimension) of the
paper and window to be the same. I have not browsed through Bill Thompson's
(sp?) recent posting so perhaps some of this has been delt with there. If I
were to invest the time in a WYSIWYG implementation the first thing I would do
would be to establish some standards. Such as, aspect ratio, default font size
(that is how big !p.charsize=1 makes the font) relative to the vertical extent
of the plot (sort of a !p.charsize in normalized coordinates), use a standard
set of font metrics for both hardware and vector drawn fonts, implement a way
to rotate hardware fonts in some Xwindow systems (this one could be tough,
maybe you could use a free window pixmap, TVRD, and a rotation routine), and be
able to specify the symsize in normalized coordinates as well. With this basic
set of standards, I think you would get a WYSIWYG by default. With some effort
and a little reading (to find out things like the default fontsize for
postscript is 12pt and such), one could write a routine to call the device
routine with the proper parameter values and set values of fields in the !p
system variable to closely match with postscript what would be plotted to a
window. Later on you would have to worry about things like p[xy].thick and how
line thickness varies from device to device. I hope this motivates someone
into implementing it, I might give it a go if I can find the time.
Have Fun,
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- *-*-*-*-*-*-*-*-*-*
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- *-*-*-*-*-*-*-*-*-*
|
|
|