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

Home » Public Forums » archive » Re: Object Graphics Printing
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: Object Graphics Printing [message #32659 is a reply to message #32632] Wed, 23 October 2002 09:50 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Ben Tupper" <btupper@bigelow.org> wrote
>
> I enjoy working with objects graphics when I can... until somebody
> wants a printout. Then I hate the dang stuff. It *always* seems
> like such a tinker-with-it-until-it-works experience. Hmph!
>
> I have been daydreaming (again) about a generic tool much like
> FSC_PSCONFIG, that is, an interactive tool for placing/sizing object
> graphics on a printed page.
>
> I gather from the object printing examples in 'What's New in IDL 5.5'
> the only things that need to be modified are
>
> (1) the LOCATION property of the VIEW(s) to be drawn
>
> and
>
> (2) the SCALE properites of any of the MODELS contained in the
> VIEW(s).
>
>
> It appears that one only needs to ascertain and save the initial
> properties of the view(s) and the models contained in the view(s).
> Then, relocate the views and rescale the models for the printer.
> Next, invoke the printer's draw method. Finally, restore the original
> properties of the view(s) and models. Piece of cake, maybe.
>
>
> I find the example a bit hard to fathom because information about the
> object graphics window is used to scale/locate the object graphics
> onto the printer page. It makes it seem complicated and a bit
> adhoc... precisely my own experience.
>
>
> My questions are...
>
> (1) is it possible to properly size/place object graphics on a printer
> page given *only* the VIEW(s) and the PRINTER object?

Yes.

Look in $RSI_DIR/Examples/Visual/Utility you'll find a program called
set_view.pro which will set your view accordingly based on the destination
device (printer or window) you provide. I haven't actually tried it (I just
found it a day or so ago) but it looks promising.


> (2) If it is possible to size/locate object graphics in a general way,
> can the concept be 'enlarged' to encompass any destination device
> (like the clipboard or buffer)?

Why is it whenever I think I am the first person to stumble upon some trick
in IDL I learn that I am years behind...

While digging thru idl.dll the other day I found the methods and keywords
for IDLgrGraphic which is the superclass of all graphic atoms. Three
keywords for the GetProperty method were really interesting: XRANGE, YRANGE,
ZRANGE. Since I had been mulling about just this very thing I was quite
excited and wrote a nice little recursive function which returns the axis
aligned bounding box of a model hierarchy. Exactly what you are looking
for.

After doing this I stumbled upon the aforementioned set_view.pro and then
get_bounds.pro (in the same directory). Get_bounds.pro performs a similar
function although I haven't studied it. So much for originality. I still
like my version better though :) You are welcomed to it, although I need to
fix one feature.


You would still have to deal with scaling your models to fit the perspective
of your printed page but you should have the information you need. I would
probably create a second view specifically for printing and an additional
model that I could add an alias of my main model tree to. That way you can
scale that model without distorting your scene in other views.


Happy printing...

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: about MIN of 2D array
Next Topic: Masking using user defined ROIs

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

Current Time: Fri Oct 10 03:48:24 PDT 2025

Total time taken to generate the page: 0.72173 seconds