Re: Object Graphics Printing [message #32632 is a reply to message #32627] |
Thu, 24 October 2002 16:51   |
btupper
Messages: 55 Registered: January 2002
|
Member |
|
|
On Wed, 23 Oct 2002 09:50:16 -0700, "Rick Towler"
<rtowler@u.washington.edu> wrote:
>>
>> 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.
Thanks Rick,
Just the nudge I needed. I have used these (set_view and get_bound)
before in an generic axis object. My bride tells me that I am blessed
with a short-term memory - here's evidence.
I'm tickled to see that the model scaling is *not* fiddled with in
Set_View. Whew, I dread fiddling with the transform matrix. I think
your idea of creating a second view and model (aliased) just for the
printer is just the ticket. I wonder why the View container doesn't
accept aliased items like the model container can?
Another thing to consider is views bundled in ViewGroups and views
placed inside of scenes.
Now, if I could just figure out how David's neat little fsc_plotwindow
works!
Cheers,
Ben
|
|
|