Making and Querying a PreView Selection:
Output is controlled by the Stuff and the ToIP buttons, and by the selection rectangle. The user sweeps out a selection by moving the cursor over the viewer (note the crosshairs cursor pattern). When the left mouse button is depressed, PreView will fix one corner of the selection rectangle at the mouse point. A rectangle is then swept out by holding down the left button continuously; note the rubberbanding rectangle as feedback. Once the button is released, the user may change the selection rectangle in the following ways. If the left mouse button is depressed near a corner, then that corner will follow the mouse. If the button is depressed near the center of an edge of the rectangle, then that edge will follow the mouse. If the button is depressed near the center of the rectangle, then the entire rectangle will follow the mouse. The user may at any time cancel the selection by a middle button click in the viewer, or have the selection rectangle printed in the message window by a right button click in the viewer.
The size of the current selection x y w h is shown in the message window and the scaled width and scaled height are shown above the page slider. The units are inches. When the image has been scaled, the x y w h remains unscaled; scaled width and scaled height give the scaled dimensions of the selection.
If the user wishes to determine the size of an area of the original document, he or she should refer to the x y w h values; even if the document is scaled (to permit, for example, closer inspection of the selected area), the x y w h will reflect the size of the selected area of the original document.
The scale factor does, however, apply to the selected area if that area is inserted into a Tioga document (via the Stuff button) or saved to an Interpress file (via the ToIP button); in this case, the size of the selection, as it would appear if printed from the new Interpress or Tioga document, is given by scaled width and scaled height.
After selection, any transformations (e.g. Scale, Rotate, ...) invoked will also be reflected in the selection. It is possible but somewhat counterintuitive to modify the selection after invoking transformations. After setting the desired selection, the output control menu buttons may be invoked.
Stuff:
Stuff causes the image in the (possibly transformed) selection to be converted to a Tioga Artwork node (of type Interpress) and then "stuffed" at the current Tioga caret. To see the image in the Artwork node, execute "ArtworkInterpress on" in a Commander. Stuffing may be done with either the current selection or the whole image, may be done with or without a border, and may be fit to the margins of the Tioga document. Pop up the Stuff button to see the options and accelerators. To perform a stuff, AFTER SELECTING move the input focus (caret) to the Tioga document at the place you want the new stuffed node to go, THEN use the Stuff button.
ToIP:
ToIP causes the image in the (possibly transformed) selection to be written to an Interpress master whose file name is determined as follows:
Suppose that the PreView command was given in a Commander with working directory /tilde/YourName/pics/. Then,
a. If a file with root name Foo has been PreViewed and the Tioga selection is empty when ToIP is invoked, then /tilde/YourName/pics/Foo.ip will be written.
b. If the Tioga selection has the short name "Bar" in it when ToIP is invoked, then /tilde/YourName/pics/Bar.ip will be written.
c. If the Tioga selection has a longer file name like "FooBar.interpress" in it when ToIP is invoked, then /tilde/YourName/pics/FooBar.interpress will be written.
d. If the Tioga selection has a full file name like "/net/server/myspace/pics/Gorp.ip" in it when ToIP is invoked, then /net/server/myspace/pics/Gorp.ip will be written.
In short, the working directory of the Commander when PreView was invoked will be prepended to the file name unless a full file name is selected. ToIP may be done with either the current PreView selection or the whole image. Pop up the ToIP button to see the options and accelerators.
AISPreView and RESPreView are willing to output (Stuff or ToIP) only those pixels within the selection (clipping) rectangle instead of the entire array regardless of clipping. Now, small selections will produce small pixelMaps in the Tioga or IP output file. This can only be done, in general, for pixelMaps. If you have images in other formats which you know in your heart are just pixelMaps, convert them to AIS or RES using InterpressConverters, then clip them using PreView.
Selection:
Center- moves the image so the center of the PreView selection rectangle is in the center of the viewer. Requires a valid PreView selection. See "Making a PreView Selection".
CenterAndFit- moves the image so the center of the PreView selection rectangle is in the center of the viewer, then fits the image so as to maximize magnification while fitting the entire selection in the viewer. Aspect ratio is preserved. Requires a valid PreView selection. See "Making a PreView Selection".
CenterAndScale- moves the image so the center of the PreView selection rectangle is in the center of the viewer, then scales the image so as to maximize magnification without first fitting the entire selection in the viewer. Aspect ratio is preserved. Requires a valid PreView selection. See "Making a PreView Selection".
SelectPage- cancels the current selection and selects the entire page. Useful for finding page boundaries before a ToIP command.
SetSelection- takes the current Tioga selection and tries to parse it into the four numbers to set the selection rectangle to. The numbers should be x y w h, in that order, with no commas between them. The units are inches.
ShowSelection- shows the current selection x y w h in the message window and the scaled width and scaled height above the page slider. The units are inches. When the image has been scaled, the x y w h remains unscaled; scaled width and scaled height give the scaled dimensions of the selection.
N.B. The current implementations of clipping in the imaging contexts used by Stuff and ToIP for Interpress masters do no culling or filtering. That means that even though a small selection is made to be copied, the entire page plus the clipping commands will appear in the output node or IP Master. This will be remedied as soon as culling or filtering contexts are implemented by the Imager.