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 .)
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.
NOTE: Cleanup methods are special lifecycle methods , and as such cannot be called outside the context of object destruction. This means that in most cases, you cannot call the Cleanup method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Cleanup method from within the Cleanup method of the subclass.
The IDLgrPrinter:: Draw procedure method draws the given picture to this graphics destination. IDLgrPrinter is described above.
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.
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()
A contiguous region in the colormap can be increasing or decreasing in values. The following would be considered contiguous:
IDLgrPrinter is described above.
The IDLgrPrinter:: GetProperty procedure method retrieves the value of a property or group of properties for the printer. IDLgrPrinter is described above.
Any keyword to IDLgrPrinter::Init
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.
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).
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.
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.
The IDLgrPrinter:: Init function method initializes the printer object. IDLgrPrinter is described above.
NOTE: Init methods are special lifecycle methods , and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.
Properties retrievable via IDLgrPrinter::GetProperty
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.
Set this keyword to produce hardcopy output in landscape mode. The default value of zero indicates Portrait mode.
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).
Set this keyword equal to an integer that determines the number of copies of print data to be generated. The default is 1 copy.
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.
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.
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:
Set this keyword to indicate the units of measure for the DIMENSIONS property. Valid values are:
NOTE: If you set the value of the UNITS property (using the SetProperty method) without also setting the value of the DIMENSIONS property, IDL will convert the current size value into the new units.
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.
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.
The IDLgrPrinter:: NewPage procedure method issues a new page command to the printer. IDLgrPrinter is described above.
The IDLgrPrinter:: SetProperty procedure method sets the value of a property or group of properties for the printer. IDLgrPrinter is described above.
Any keyword to IDLgrPrinter::Init