Class ImageDocument


Overview

Image documents are the base containers for image displays and other components. Each image document has a root component that can be accessed via ImageDocumentGetRootComponent,in which image displays may be placed. The child coordinate system of this annotation is called page coordinates. This coordinate system has arbitrary units and origin, but these are given a physical interpretation when the document is first viewed in page mode or the method ImageDocumentEnsurePlacedOnPage is first called, at which point ImageDocumentGetPageBounds will return the rectangle of the printable page expressed in page coordinates.

An image document may be viewed in its entirety in page mode, or one of its top-level image displays may be viewed in image mode. The coordinate system used to express the the portion of the document currently viewed in the window is view coordinates. In page mode this is equivalent to page coordinates; in image mode it has no equivalent, but methods like ComponentGetBoundingRectInView can be used to interpret the coordinates in terms of the visible components. View coordinates can be related to window coordinates by finding the currently visible area in view coordinates using ImageDocumentGetVisibleViewRect, and then by finding the visible area in screen coordinates using ImageDocumentGetWindow to get the document's window and DocumentWindowGetSize to get the size of the interior of the window. Each image document mode has a reference point size, which is the height of one text point, and a minimum resolution, which is the size of a pixel in the appropriate drawing surface. The reference point size in view coordinates is given by ImageDocumentGetReferencePointSize, and the minimum point size in view coordinates by ImageDocumentGetMinimumPointSize. In image mode, both the reference point and the minimum point are one screen pixel. In page mode, the reference point size is the size of a dot at 72dpi ( before any scaling specified in the print dialog ), and the minimum point size is the dot size of the selected printer.

Methods

void ImageDocumentAddImage( ImageDocument imgDoc, ImageReference image )
Adds the given image to the list maintained in the image document.
 
ImageDisplay ImageDocumentAddImageDisplay( ImageDocument imgDoc, ImageReference image, Number displayType )
Adds the given image and an image display for it of the given type.
 
void ImageDocumentAddToUserInterface( ImageDocument imgDoc )
Places the image document in the list of user interface documents.
 
void ImageDocumentClean( ImageDocument imgDoc )
Marks the image document as clean (doesn't need to be saved).
 
ImageDocument ImageDocumentClone( ImageDocument imgDoc, Boolean doDeepCopy )
Returns a duplicate of the image docuemnt, creating a copy of its images if 'doDeepCopy' is true.
 
void ImageDocumentClose( ImageDocument imgDoc, Boolean saving )
Closes the given image document. If saving is true then asks whether to save it, otherwise just closes it.
 
Number ImageDocumentCountImages( ImageDocument imgDoc )
Returns the number of images contained in this image document.
 
ImageReference ImageDocumentCreateRGBImageFromDocument( ImageDocument imgDoc, Number width, Number height, Number extract_style, Number constraints )
Creates an image by scaling the image document into ( width, height ).
 
void ImageDocumentDeleteImage( ImageDocument imgDoc, ImageReference image )
Deletes the given image from this image document.
 
Boolean ImageDocumentDoesImageWithIDExist( ImageDocument imgDoc, Number id )
Determines whether the image with the given id exists within this image document.
 
void ImageDocumentEnsurePlacedOnPage( ImageDocument imgDoc )
Makes sure the document has been layed out on the physical page.
 
Number ImageDocumentGetAsPICT( ImageDocument imgDoc )
Returns this image as a PICT.
 
Component ImageDocumentGetComponentByID( ImageDocument imgDoc, Number id )
Returns an annotation contained in this image document by id.
 
Number ImageDocumentGetID( ImageDocument imgDoc )
Gets the id of the image document.
 
ImageReference ImageDocumentGetImage( ImageDocument imgDoc, Number position )
Returns the image contained within this image document by position.
 
ImageReference ImageDocumentGetImageByID( ImageDocument imgDoc, Number id )
Returns an image contained in this image document by id.
 
ImageDisplay ImageDocumentGetImageModeDisplay( ImageDocument imgDoc )
Gets the image display targeted by the current image mode.
 
void ImageDocumentGetMinimumPointSize( ImageDocument imgDoc, NumberVariable x, NumberVariable y )
Gets the size of the minimum point in view coordinates.
 
String ImageDocumentGetName( ImageDocument imgDoc )
Returns the name of the image document.
 
void ImageDocumentGetPageBounds( ImageDocument imgDoc, NumberVariable top, NumberVariable left, NumberVariable bottom, NumberVariable right )
Gets the page bounds of the document in page coordinates.
 
void ImageDocumentGetPageResolution_72dpi( ImageDocument imgDoc, NumberVariable horz, NumberVariable vert )
Returns the resolution of page coordinates in 72 dots per inch ( returns page units per dot ).
 
void ImageDocumentGetPageResolution_Printer( ImageDocument imgDoc, NumberVariable horz, NumberVariable vert )
Returns the resolution of page coordinates in printer pixels ( returns page units per printer pixel ).
 
void ImageDocumentGetPaperBounds( ImageDocument imgDoc, NumberVariable top, NumberVariable left, NumberVariable bottom, NumberVariable right )
Gets the paper bounds of the document in page coordinates.
 
void ImageDocumentGetPreferredViewRect( ImageDocument imgDoc, NumberVariable top, NumberVariable left, NumberVariable bottom, NumberVariable right )
Gets rectangle in view coordinates of the area that is by default displayed in this mode.
 
void ImageDocumentGetReferencePointSize( ImageDocument imgDoc, NumberVariable x, NumberVariable y )
Gets the size of the reference point in view coordinates.
 
Component ImageDocumentGetRootComponent( ImageDocument imgDoc )
Gets the root annotation of the image document.
 
TagGroup ImageDocumentGetTagGroup( ImageDocument imgDoc )
Gets the tag group associated with the image document.
 
void ImageDocumentGetUnzoomedPointSize( ImageDocument imgDoc, NumberVariable x, NumberVariable y )
Gets the size of the unzoomed point in view coordinates.
 
void ImageDocumentGetViewExtent( ImageDocument imgDoc, NumberVariable top, NumberVariable left, NumberVariable bottom, NumberVariable right )
Gets the extent in view coordinates of the items visible in the current view mode.
 
void ImageDocumentGetViewToWindowTransform( ImageDocument imgDoc, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Returns the transformation from view to screen coordinates.
 
void ImageDocumentGetVisibleViewRect( ImageDocument imgDoc, NumberVariable top, NumberVariable left, NumberVariable bottom, NumberVariable right )
Gets the view coordinates of the rectangle visible in the view.
 
DocumentWindow ImageDocumentGetWindow( ImageDocument imgDoc )
Returns the window displaying the document.
 
Boolean ImageDocumentHasBeenPlacedOnPage( ImageDocument imgDoc )
Returns 'true' if the document has been layed out within the physical page.
 
void ImageDocumentHide( ImageDocument imgDoc )
Hides the given image document.
 
Boolean ImageDocumentIsInImageMode( ImageDocument imgDoc )
Returns true if the view of the document is in image mode.
 
Boolean ImageDocumentIsInPageMode( ImageDocument imgDoc )
Returns true if the view of the document is in page mode.
 
Boolean ImageDocumentIsValid( ImageDocument imgDoc )
Returns true if 'imageDocument' points to a valid object.
 
void ImageDocumentMaximizeRectInView( ImageDocument imgDoc, Number top, Number left, Number bottom, Number right )
Zooms the view so the rectangle is centered and maximal.
 
Boolean ImageDocumentPrint( ImageDocument imgDoc )
Print the image document, returning 'true' if successful.
 
void ImageDocumentRemoveFromUserInterface( ImageDocument imgDoc )
Removes the image document from the list of user interface documents.
 
void ImageDocumentSaveToFile( ImageDocument imgDoc, String handler, String fileName )
Saves the image document to the given file name using the I/O handler specified.
 
void ImageDocumentSetCurrentViewAsUnzoomed( ImageDocument imgDoc )
Makes the current view the unzoomed view.
 
void ImageDocumentSetName( ImageDocument imgDoc, String name )
Sets the name of the image document.
 
void ImageDocumentSetRectInView( ImageDocument imgDoc, Number v_t, Number v_l, Number v_b, Number v_r, Number w_t, Number w_l, Number w_b, Number w_r )
Zooms the view so the view rect (v_l,v_t,v_b,v_r) is displayed in the window rect (w_l,w_t,w_b,w_r).
 
DocumentWindow ImageDocumentShow( ImageDocument imgDoc )
Shows the given image document.
 
DocumentWindow ImageDocumentShowAtPosition( ImageDocument imgDoc, Number x, Number y )
Shows the given image document at the application position (x,y).
 
DocumentWindow ImageDocumentShowAtRect( ImageDocument imgDoc, Number top, Number left, Number bottom, Number right )
Shows the given image document at the rect (top,left,bottom,right).
 
void ImageDocumentSwitchToImageMode( ImageDocument imgDoc, ImageDisplay imgDisp )
Switches the view of the document to image mode focused on the display 'imgDisp'.
 
void ImageDocumentSwitchToPageMode( ImageDocument imgDoc )
Switches the view of the document to page mode.
 
void ImageDocumentUpdateDisplay( ImageDocument imgDoc )
Updates the display of the image document.
 

Related Functions

ImageDocument =( ImageDocument, ! )
 
ImageDocument =( ImageDocument, ImageDocument )
 
ImageDocument CreateImageDocument( String title )
Creates an empty image document.
 
ImageDocument GetFrontImageDocument( )
Returns the front image document.
 
ImageDocument GetImageDocument( Number position )
Returns the image document by position with the application.
 
ImageDocument GetImageDocumentByID( Number id )
Returns the image document whose id is 'id'.
 
ImageDocument ImageDocumentNullify( ! )
 
ImageDocument ImageWindowGetImageDocument( DocumentWindow window )
Gets the image document displayed in the window.
 
ImageDocument NewImageDocument( String title )
Creates an empty image document.
 
ImageDocument NewImageDocumentFromFile( String path_name )
Creates a new image document from a file.