[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDLgrPrinter



Hello (head hanging low),

I'm not sure if answering my own question indicates that I'm
clever or slow.  I don't think I want to know.

The correct way to control the size of graphics for the printer
(and the clipboard) is to control the dimensions and location of
the View that is being rendered.

r = dialog_printersetup(myprinterobject)
if r = 1 then begin

    myview->getproperty, location = wloc, dimensions = wdim
    myprinterobject->getproperty, dimensions = pdim
        ;to get a square plot... choose the smaller of pdim
        ;reduce its size a bit to get a decent margin
    viewdim = min(pdim) *0.8
        ;position the graphic by controlling the LOCATION
    myview->setproperty, dimension = viewdim, location =
pdim*0.1
    myprinterobject->newpage
    myprinterobject->draw, myview
    myprinterobject->newdocument
        ;restore the original view dimensions
    myview->setproperty, location = wloc, dimensions = wdim
endif


So, it does seem to be a  analogous to the controlling the
direct graphics device PRINTER.

Phew!  Now, if I could just find that pointer I lost...

Ben


Ben Tupper wrote:

> Hello,
>
> How is the graphic plotting size/position controlled for the
> IDLgrPrinter object?  I would like to output a 2d plot such
> that the axes are scaled isotropically.  I have the view
> dimensioned properly for IDLgrWindow and IDLgrClipboard...
> but I don't see how to control the printer dimensions and
> offset.
>
> I am using the following steps to print:
>
> r = dialog_printersetup(myprinterobject)
> if r = 1 then begin
>     myprinterobject->newpage
>     myprinterobject->draw, myview
>     myprinterobject->newdocument
> endif
>
> The graphic atoms in the view are NOT normalized but are in
> natural data coordinates.
>
> I keep looking for the equivalent controls dor the direct
> graphics PRINTER device such as...
> DEVICE,  ysize = blah, xsize = fooey, xoffset = duh, ...
>
> IDL> help, !version,/str
> ** Structure !VERSION, 7 tags, length=44:
>    ARCH            STRING    'x86'
>    OS              STRING    'Win32'
>    OS_FAMILY       STRING    'Windows'
>    RELEASE         STRING    '5.4'
>    BUILD_DATE      STRING    'Sep 25 2000'
>    MEMORY_BITS     INT             32
>    FILE_OFFSET_BITS
>                    INT       =       64
>
> Thanks,
>
> Ben
>
> --
> Ben Tupper
> 248 Lower Round Pond Road
> POB 106
> Bristol, ME 04539
>
> Tel: (207) 563-1048
> Email: PemaquidRiver@tidewater.net

--
Ben Tupper
248 Lower Round Pond Road
POB 106
Bristol, ME 04539

Tel: (207) 563-1048
Email: PemaquidRiver@tidewater.net