IDLgrPrinter

A printer object represents a hardcopy graphics destination. When a printer object is created, the printer device to which it refers is the default system printer. To change the printer, utilize the printer dialogs (see "DIALOG_PRINTJOB" and "DIALOG_PRINTERSETUP" in the IDL Reference Guide .)

Superclasses

This class has no superclass.

Subclasses

This class has no subclasses.

Creation

See IDLgrPrinter::Init

Methods

Intrinsic Methods

This class has the following methods:

 


IDLgrPrinter::Cleanup

The IDLgrPrinter:: Cleanup procedure method performs all cleanup on the object. If a document is open (that is, if graphics have been draw to the printer), the document is closed and the pending graphics are sent to the current printer. IDLgrPrinter is described above.

Calling Sequence

OBJ_DESTROY, Obj

or

Obj -> [IDLgrPrinter::] Cleanup                               ( In a subclass' Cleanup method only .)

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrPrinter::Draw

The IDLgrPrinter:: Draw procedure method draws the given picture to this graphics destination. IDLgrPrinter is described above.

Calling Sequence

Obj -> [IDLgrPrinter::] Draw, Picture

Arguments

Picture

The view (an instance of an IDLgrView object), viewgroup (an instance of an IDLgrViewgroup object), or scene (an instance of an IDLgrScene object) to be drawn.

Keywords

There are no keywords for this method.


IDLgrPrinter::GetContiguousPixels

The IDLgrPrinter:: GetContiguousPixels function method returns an array of long integers whose length is equal to the number of colors available in the index color mode (that is, the value of the N_COLORS property).

The returned array marks contiguous pixels with the ranking of the range's size. This means that within the array, the elements in the largest available range are set to zero, the elements in the second-largest range are set to one, etc. Use this range to set an appropriate colormap for use with the SHADE_RANGE property of the IDLgrSurface and IDLgrPolygon object classes.

To get the largest contiguous range, you could use the following IDL command:

result = obj -> GetContiguousPixels()

Range0 = WHERE(result EQ 0)

A contiguous region in the colormap can be increasing or decreasing in values. The following would be considered contiguous:

[0,1,2,3,4]

[4,3,2,1,0]

IDLgrPrinter is described above.

Calling Sequence

Return = Obj -> [IDLgrPrinter::] GetContiguousPixels()

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrPrinter::GetProperty

The IDLgrPrinter:: GetProperty procedure method retrieves the value of a property or group of properties for the printer. IDLgrPrinter is described above.

Calling Sequence

Obj -> [IDLgrPrinter::] GetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrPrinter::Init

ALL

Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with the state of this object. State information about the object includes things like color, range, tick direction, etc., but not image, vertex, or connectivity data, or user values.

DIMENSIONS

Set this keyword to a named variable that will contain a two-element vector of the form [ width , height ] specifying the overall `drawable' area that may be printed on a page. By default, the dimensions are measured in device units (refer to the UNITS keyword).

NAME

A string containing the operating system-specific name of the print stream. e.g. '\\BORG\HpJet'.

RESOLUTION

Set this keyword to a named variable that will contain a vector of the form [ xres , yres ] defining the pixel resolution, measured in centimeters per pixel.


IDLgrPrinter::GetTextDimensions

The IDLgrPrinter:: GetTextDimensions function method retrieves the dimensions of a text object that will be rendered on the printer. The result is a 3-element floating-point vector [ xDim , yDim , zDim ] representing the dimensions of the text object, measured in data units. IDLgrPrinter is described above.

Calling Sequence

Result = Obj -> [IDLgrPrinter::] GetTextDimensions( TextObj )

Arguments

TextObj

The object reference to a text or axis object for which the text dimensions are requested.

Keywords

DESCENT

Set this keyword equal to a named variable that will contain an array of floating-point values (one for each string in the IDLgrText object). The values represent the distance to travel (parallel to the UPDIR vector) from the text baseline to reach the bottom of the lowest descender in the string. All values will be negative numbers, or zero. This keyword is valid only if TextObj is an IDLgrText object.


IDLgrPrinter::Init

The IDLgrPrinter:: Init function method initializes the printer object. IDLgrPrinter is described above.

Calling Sequence

Obj = OBJ_NEW('IDLgrPrinter')

or

Result = Obj -> [IDLgrPrinter::] Init( )         ( In a subclass' Init method only .)

Arguments

There are no arguments for this method.

Keywords

Properties retrievable via IDLgrPrinter::GetProperty

COLOR_MODEL (Get)

Set this keyword to the color model to be used for the buffer:

GRAPHICS_TREE (Get, Set)

Set this keyword to an object reference of type IDLgrScene, IDLgrViewgroup, or IDLgrView. If this property is set to a valid object reference, calling the Draw method on the destination object with no arguments will cause the object reference associated with this property to be drawn. If this object is valid and the destination object is destroyed, this object reference will be destroyed as well. By default the GRAPHICS_TREE property is set equal to the null-object.

LANDSCAPE (Get, Set)

Set this keyword to produce hardcopy output in landscape mode. The default value of zero indicates Portrait mode.

N_COLORS (Get)

Set this keyword to the number of colors (between 2 and 256) to be used if the COLOR_MODEL is set to Indexed (1). This keyword is ignored if the COLOR_MODEL is set to RGB (0).

N_COPIES (Get, Set)

Set this keyword equal to an integer that determines the number of copies of print data to be generated. The default is 1 copy.

PALETTE (Get, Set)

Set this keyword equal to the object reference of a palette object (an instance of the IDLgrPalette object class) to specify the red, green, and blue values that are to be loaded into the graphics destination's color lookup table if the Indexed color model is used.

PRINT_QUALITY (Get, Set)

Set this keyword to an integer value indicating the print quality at which graphics are to be drawn to the printer. Note that the print quality is independent of the rendering quality (as set by the QUALITY keyword). Valid values are:

Generally, setting the print quality to a lower value will increase the speed of the printing job, but decrease the resolution; setting it to a higher value will cause the printing job to take more time, but will increase the resolution.

QUALITY (Get, Set)

Set this keyword to an integer value indicating the rendering quality at which graphics are to be drawn to this destination. Note that the rendering quality is independent of the print quality (as set by the PRINT_QUALITY keyword). Valid values are:

UNITS (Get, Set)

Set this keyword to indicate the units of measure for the DIMENSIONS property. Valid values are:

UVALUE (Get, Set)

Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.


IDLgrPrinter::NewDocument

The IDLgrPrinter:: NewDocument procedure method closes the current document (a page or group of pages), which causes any pending output to be sent to the printer, finishing the printer job. IDLgrPrinter is described above.

Calling Sequence

Obj -> [IDLgrPrinter::] NewDocument

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrPrinter::NewPage

The IDLgrPrinter:: NewPage procedure method issues a new page command to the printer. IDLgrPrinter is described above.

Calling Sequence

Obj -> [IDLgrPrinter::] NewPage

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrPrinter::SetProperty

The IDLgrPrinter:: SetProperty procedure method sets the value of a property or group of properties for the printer. IDLgrPrinter is described above.

Calling Sequence

Obj -> [IDLgrPrinter::] SetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrPrinter::Init