Class Component


Overview

Objects of type 'Component' are image document components, which include annotations ( text, box, line, etc. ), image displays, masks, and regions of interest. Components may be placed on a page, in an image display, or in a group, each of which is represented by a type of component. The containing component is referred to as the parent component, and it determines the coordinate system in which child locations and sizes are specified ( the coordinate system of a container is its child coordinate system, and the child's local coordinate system ). Other useful coordinate systems are

If a method requires or returns coordinates, they are usually specified in the component's local coordinate system. However, if the method ends in 'InView' the coordinates are in view coordinates. Note that none of the methods that set coordinates use view coordinates. Thus, to manipulate the view of a component, use the methods ending in 'InView' to get coordinates, and ImageDocument methods such as ImageDocumentSetRectInView to position the component.

The annotation type, used by the function NewAnnotation and the method ComponentGetType, can be one of the following numbers

The control points referred to in several of the methods can be one of

Methods

void ComponentAddChildAfter( Component parent, Component child, Component annot_pos )
Adds 'child' to 'parent's list of sub-annotations after 'annot_pos'.
 
void ComponentAddChildAtBeginning( Component parent, Component child )
Adds 'child' to the beginning of 'parent's list of sub-annotations.
 
void ComponentAddChildAtEnd( Component parent, Component child )
Adds 'child' to the end of 'parent's list of sub-annotations.
 
void ComponentAddChildBefore( Component parent, Component child, Component annot_pos )
Adds 'child' to 'parent's list of sub-annotations before 'annot_pos'.
 
Component ComponentAddNewComponent( Component parent, Number type, Number f1, Number f2, Number f3, Number f4 )
Creates a new annotaiton of type 'type' and adds it to 'parent'
 
Component ComponentClone( Component comp, Boolean doDeepCopy )
Returns a identical copy of the component and all its sub-components, copying associated images if 'doDeepCopy' is true.
 
Number ComponentCountChildren( Component comp )
Returns the number of sub components.
 
Number ComponentCountChildrenOfType( Component comp, Number type )
Returns the number of sub-components of type 'type'.
 
void ComponentGetBoundingRect( Component comp, NumberVariable t, NumberVariable l, NumberVariable b, NumberVariable r )
Gets the bounding rect of the annotation.
 
void ComponentGetBoundingRectInView( Component comp, NumberVariable t, NumberVariable l, NumberVariable b, NumberVariable r )
Gets the bounding rect of the annotation.
 
Component ComponentGetChild( Component comp, Number index )
Returns the 'index'th sub-component of 'comp'.
 
Component ComponentGetChildByID( Component comp, Number ID )
Returns the component child of 'comp' with id 'ID'.
 
void ComponentGetChildToLocalTransform( Component comp, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Gets the transformation from child to local coordinates.
 
void ComponentGetChildToPageTransform( Component comp, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Gets the transformation from child to page coordinates.
 
void ComponentGetChildToViewTransform( Component comp, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Gets the transformation from child to view coordinates.
 
void ComponentGetChildToWindowTransform( Component comp, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Gets the transformation from child to window coordinates.
 
Boolean ComponentGetControlPoint( Component comp, Number loc, NumberVariable x, NumberVariable y )
Returns the value '(x,y)' associated with the control point, and returns 'true' if the control point is valid
 
Component ComponentGetDescendentByID( Component comp, Number ID )
Returns the component child of 'comp' with id 'ID'.
 
Number ComponentGetDrawingMode( Component comp )
Gets the drawing mode of the image doucment component.
 
Number ComponentGetFillMode( Component comp )
Gets the fill mode of the image doucment component.
 
Number ComponentGetFontAttributes( Component comp )
Gets the attributes of the component's font.
 
String ComponentGetFontFaceName( Component comp )
Gets the face name of the component's font.
 
void ComponentGetFontInfo( Component comp, String faceName, NumberVariable attributes, NumberVariable size, NumberVariable text_encoding )
Gets a description of the component's font.
 
void ComponentGetFontInfo( Component comp, String faceName, NumberVariable attributes, NumberVariable size )
Gets a description of the component's font.
 
Number ComponentGetFontSize( Component comp )
Gets the point size of the component's font.
 
Number ComponentGetID( Component annot )
Gets the unique identifier of the annotation in the image document.
 
ImageDocument ComponentGetImageDocument( Component annot )
Gets the image document associated with the annotation.
 
void ComponentGetLocalToPageTransform( Component comp, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Gets the transformation from local to page coordinates.
 
void ComponentGetLocalToViewTransform( Component comp, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Gets the transformation from local to view coordinates.
 
void ComponentGetLocalToWindowTransform( Component comp, NumberVariable off_x, NumberVariable off_y, NumberVariable scale_x, NumberVariable scale_y )
Gets the transformation from local to window coordinates.
 
Component ComponentGetNthChildOfType( Component comp, Number type, Number index )
Returns the nth sub-component of type 'type'.
 
Component ComponentGetParentComponent( Component comp )
Gets the parent component of 'comp', if any.
 
ImageDisplay ComponentGetParentImageDisplay( Component comp )
Gets the parent image display of the 'comp', if any.
 
void ComponentGetRect( Component comp, NumberVariable top, NumberVariable left, NumberVariable bottom, NumberVariable right )
Gets the rectangle of the annotation.
 
void ComponentGetRectInView( Component comp, NumberVariable top, NumberVariable left, NumberVariable bottom, NumberVariable right )
Gets the rectangle of the annotation.
 
TagGroup ComponentGetTagGroup( Component annot )
Gets the tag group associated with the annotation.
 
Number ComponentGetType( Component annot )
Gets the type of the annotation.
 
Boolean ComponentIsOfType( Component annot, Number type )
Gets the type of the annotation.
 
Boolean ComponentIsSelected( Component comp )
Returns whether the component is selected.
 
Boolean ComponentIsValid( Component annot )
Returns true if 'annot' points to a valid object.
 
void ComponentOffsetControlPoint( Component comp, Number loc, Number x, Number y, Number restrict_style )
Changes the control point 'loc' of 'comp' by '(x,y)' using restrictions specified by 'restrict_style'.
 
void ComponentPositionAroundPoint( Component comp, Number new_x, Number new_y, Number rel_x, Number rel_y, Boolean horz, Boolean vert )
Moves the annotation so if 'horz', the 'rel_x' horizontal point in the bounding rect is at 'new_x', and if 'vert', the 'rel_y' vertical point in the bounding rect is at 'new_y'
 
void ComponentRemoveFromParent( Component comp )
Removes the image document component from its parent.
 
void ComponentSetControlPoint( Component comp, Number loc, Number x, Number y, Number restrict_style )
Sets the control point 'loc' of 'comp' to '(x,y)' using restrictions specified by 'restrict_style'.
 
void ComponentSetDrawingMode( Component comp, Number mode )
Sets the drawing mode of the image document component.
 
void ComponentSetFillMode( Component comp, Number mode )
Sets the fill mode of the image document component.
 
void ComponentSetFontAttributes( Component comp, Number attributes )
Sets the attributes of the component's font.
 
void ComponentSetFontFaceName( Component comp, String face_name )
Sets the face name of the component's font.
 
void ComponentSetFontInfo( Component comp, String face_name, Number attributes, Number size, Number text_encoding )
Sets the font information of the component's font.
 
void ComponentSetFontInfo( Component comp, String face_name, Number attributes, Number size )
Sets the font information of the component's font.
 
void ComponentSetFontSize( Component comp, Number size )
Sets the point size of the component's font.
 
void ComponentSetRect( Component comp, Number top, Number left, Number bottom, Number right )
Sets the rectangle of the annotation.
 
void ComponentSetSelected( Component comp, Boolean select )
Sets the selection status of the component.
 
void ComponentTransformCoordinates( Component comp, Number off_x, Number off_y, Number scale_x, Number scale_y )
Transforms the component by the specified transform.
 

Related Functions

Component =( Component, ! )
 
Component =( Component, Component )
 
Component ComponentNullify( ! )
 
void GroupAnnotationUngroup( Component comp )
Ungroups the group annotation.
 
Component ImageDocumentGetComponentByID( ImageDocument imgDoc, Number id )
Returns an annotation contained in this image document by id.
 
Component ImageDocumentGetRootComponent( ImageDocument imgDoc )
Gets the root annotation of the image document.
 
Component NewArrowAnnotation( Number top, Number left, Number bottom, Number right )
Creates a new arrow annotation.
 
Component NewBoxAnnotation( Number top, Number left, Number bottom, Number right )
Creates a new box annotation.
 
Component NewComponent( Number type, Number f1, Number f2, Number f3, Number f4 )
Creates a new annotaiton of type 'type'
 
Component NewDoubleArrowAnnotation( Number top, Number left, Number bottom, Number right )
Creates a new double arrow annotation.
 
Component NewGroupAnnotation( )
Creates a new group annotation.
 
Component NewLineAnnotation( Number top, Number left, Number bottom, Number right )
Creates a new line annotation.
 
Component NewOvalAnnotation( Number top, Number left, Number bottom, Number right )
Creates a new oval annotation.
 
Component NewPictureAnnotation( Number top, Number left, Number bottom, Number right, Number picture )
Creates a new picture annotation.
 
Component NewTextAnnotation( Number left, Number top, String text, Number size )
Creates a new text annotation.
 
void PictureAnnotationSetPicture( Component comp, Number picture )
Sets the picture of an annotation.
 
Number TextAnnotationGetAlignment( Component comp )
Gets the alignment of the text in the text annotation.
 
void TextAnnotationGetFixedPoint( Component comp, NumberVariable x, NumberVariable y )
Gets the fixed point of the text annotation.
 
Number TextAnnotationGetResizeStyle( Component comp )
Gets the resize style of the text annotation.
 
String TextAnnotationGetText( Component comp )
Gets the text of a text annotation.
 
void TextAnnotationSetAlignment( Component comp, Number alignment )
Sets the alignment of the text in the text annotation.
 
void TextAnnotationSetFixedPoint( Component comp, Number x, Number y )
Sets the fixed point of the text annotation.
 
void TextAnnotationSetResizeStyle( Component comp, Number style )
Sets the resize style of the text annotation.
 
void TextAnnotationSetText( Component comp, String text )
Sets the text of a text annotation.