LEAD Technologies, Inc

WPF Annotation Objects - Automated Features

Note: This topic is for Document/Medical only.

When working with automated annotations, you can use automated pop-up menus when you right-click an object while in design mode. These menus allow you to set certain properties of The WPF annotation object. In design mode, you can click on the object with the right mouse button to perform various actions. All objects provide the following actions:

The following topics describe the automated annotation features for particular objects and tools:

Go to the Top of this topic.


Audio Clip Tool

The AnnAudioObject annotation object is a rectangle containing a scaled image that can be activated to play a WAV file. In design mode, you can click and drag to specify the rectangle in the current window. You can then use the Properties dialog to specify the WAV file. In run mode the mouse pointer changes to a hand when it is over the object, and clicking on the object plays the WAV file. In design mode, you can click on the object with the right mouse button to do the following:

In design mode, access the Audio Properties dialog box to do the following: When you save this type of annotation, the WAV file is not saved. Only its path is saved. For more information, refer to AnnAudioObject.

Go to the Top of this topic.


Button Tool The AnnButtonObject annotation object is an image of a standard Windows button that can be activated. In design mode, you can click and drag to specify the size of the button in the current window. In run mode the mouse pointer changes to a hand when it is over the button, and clicking on the button fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Button Properties dialog box to do the following: For more information, refer to AnnButtonObject.

Go to the Top of this topic.


Cross Product Tool

The AnnCrossProductObject annotation object consists of two simple lines intersecting at right angles. With the automated functions, in design mode the cross product is started on a mouse-down and completed on a mouse-up. In run mode the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.).In design mode, you can click on the object with the right mouse button to do the following:

In design mode, access the Cross Product Properties dialog box to do the following: For more information, refer to AnnCrossProductObject.

Go to the Top of this topic.


Ellipse Tool The AnnEllipseObject annotation object is a simple ellipse. In design mode, you click and drag to specify the ellipse in the current window. In run mode the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Ellipse Properties dialog box to do the following: For more information, refer to AnnEllipseObject.

Go to the Top of this topic.


Freehand Hot Spot Tool The AnnFreehandHotspotObject annotation object is an array of points that creates a sequence of joined lines. With the automated functions, in design mode, each line segment is formed with a mouse move when the left button is down, and the object is completed on a mouse up. In run mode, the object is transparent, but the mouse pointer changes to a hand when it is over the object. In run mode, clicking on the hotspot fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Freehand Hot Spot Properties dialog box to do the following: For more information, refer to AnnFreehandHotspotObject.

Go to the Top of this topic.


Highlight Tool The AnnHiliteObject annotation object is a rectangle with default properties that are appropriate for highlighting an area. In design mode, you can click and drag to specify the rectangle in the current window. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the hilite object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Hilite Properties dialog box to do the following: For more information, refer to AnnHiliteObject.

Go to the Top of this topic.


Hotspot Tool The AnnHotspotObject annotation object is a rectangle with a scaled picture that is displayed whenever The WPF annotation is in design mode. In design mode, you can click and drag to specify the rectangle in the current window. In run mode, the object is transparent but the mouse pointer changes to a hand when it is over the object, and clicking on the hotspot fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the HotSpot Properties dialog box to do the following: For more information, refer to AnnHotspotObject.

Go to the Top of this topic.


Line Tool The AnnLineObject annotation object is a simple Line. In design mode, the line is formed with a mouse move when the left button is down, and the object is completed on a mouse up. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the line fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Line Properties dialog box to do the following: For more information, refer to AnnLineObject.

Go to the Top of this topic.


Note Tool The AnnNoteObject annotation object is a rectangle with a shadow border and a colored background (yellow by default). It contains a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. In design mode, you can click and drag to specify the rectangle in the current window. You can then use the Note Properties dialog box to enter text. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the note object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Note Properties dialog box to do the following: For more information, refer to AnnNoteObject.

Go to the Top of this topic.


Point Tool The AnnPointObject annotation object is a single point. With the automated functions, in design mode, each point is formed with a mouse click. This object works two ways: If the object has a valid image, in run mode the object draws the picture centered around its point. If there is no image, in run mode the object draws an ellipse using its stroke and fill. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the point object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Point Properties dialog box to do the following: For more information, refer to AnnPointObject.

Go to the Top of this topic.


Pointer Tool The AnnPointerObject annotation object is defined by two points, with the an arrow at the first point. In design mode, the line is formed with a mouse move when the left button is down, and the object is completed on a mouse up. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the line fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Pointer Properties dialog box to do the following: For more information, refer to AnnPointerObject.

Go to the Top of this topic.


Polygon Tool The AnnPolygonObject annotation object is an array of points that define the vertices of a polygon. In design mode, each line segment is formed with a mouse click, and the object is completed on a double-click. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, access the Polygon Properties dialog box to do the following: For more information, refer to AnnPolygonObject.

Go to the Top of this topic.


Polyline (Freehand Line) Tool The AnnPolylineObject freehand annotation object is an array of points that create a sequence of joined lines. In design mode, each line segment is formed with a mouse move event when the left button is down, and the object is completed on a mouse up event. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Polyline Properties dialog box to do the following: For more information, refer to AnnPolylineObject.

Go to the Top of this topic.


Protractor Tool

The AnnProtractorObject annotation object consists of two simple lines joined at a vertex to create an angle. With the automated functions, the first line of the protractor is started on a mouse-down and completed on a second mouse-down. The second line is completed on a third mouse-down. The center is the point created with the first mouse-down. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.). In design mode, you can click on the object with the right mouse button to do the following:

In design mode, access the Protractor Properties dialog box to do the following: For more information, refer to AnnProtractorObject.

Go to the Top of this topic.


Rectangle Tool The AnnRectangleObject annotation object is a simple rectangle. In design mode, you can click and drag to specify the rectangle in the current window. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Rectangle Properties dialog box to do the following: For more information, refer to AnnRectangleObject.

Go to the Top of this topic.


Redaction Tool The AnnRedactionObject annotation object is a rectangle with default properties that are appropriate for blacking out an area. In design mode, you can click and drag to specify the rectangle in the current window. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Redaction Properties dialog box to do the following: For more information, refer to AnnRedactionObject.

Go to the Top of this topic.


Rubber Stamp Tool The AnnRubberStampObject annotation object is an object that can use any of many predefined metafiles. In design mode, you can click and drag to specify the rectangle in the current window. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Rubber Stamp Properties dialog box to do the following: For more information, refer to AnnRubberStampObject.

Go to the Top of this topic.


Ruler Tool

The AnnRulerObject annotation object is a line marked off in units that can be used to measure the distance between two points on the image on which it lies. In design mode, the ruler is formed with a mouse move when the left button is down, and the object is completed on a mouse up. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the ruler fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following:

In design mode, access the Ruler Properties dialog box to do the following: For more information, refer to AnnRulerObject.

Go to the Top of this topic.


Selection Pointer Tool The selection pointer is the mouse pointer used to select and manipulate annotation objects when in design mode. With the selection pointer, you can select one or more objects as follows: When an object is selected, handles appear on the corners of its bounding rectangle. You can click on the body of the object to drag it to another position. You can click on a handle and drag the handle to resize the object. If more than one object is selected, all of them are moved. In addition, you can use the selection pointer to rotate an object. If you hold down the shift key, click on a handle, and drag the mouse, the object rotates. If more than one object is selected, all of them are rotated, using the center of the group as the center of rotation. The popup menu is also affected if more than one object is selected. In that case, when you click the right mouse button, the popup menu lets you change the properties of all the selected objects, and it lets you delete all the selected objects. For more information, refer to AnnSelectObject.

Go to the Top of this topic.


Stamp Tool The AnnStampObject annotation object can be a bitmap image or a text string in a rectangular frame. In design mode, you can click and drag to specify a rectangle. Then, if you specify a text string, the text is centered in the rectangle. If you specify a bitmap, the bitmap is scaled to fit the rectangle. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Stamp Properties dialog box to do the following: For more information, refer to AnnStampObject.

Go to the Top of this topic.


Text Tool The AnnTextObject annotation object is a rectangle containing a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. In design mode, you can click and drag to specify the rectangle in the current window. A dialog box then lets you enter the text. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Text Properties dialog box to do the following: For more information, refer to AnnTextObject.

Go to the Top of this topic.


TextRollup Tool The AnnTextRollupObject annotation object extends the AnnNoteObject by adding an Expanded property. When this property is set to true, the text rollup object looks and behaves like a normal note. When Expanded is set to false, the text rollup object collapses to display only one line of text. This saves space on the container surface. Like the AnnNoteObject, the AnnTextRollupObject is a rectangle with a shadow border and a colored background (yellow by default). It contains a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. In design mode, you can click and drag to specify the rectangle in the current window. You can then use the Text Rollup Properties dialog box to enter text. In run mode, clicking on the object causes it to switch between the Expanded and the Collapsed display. In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Text Rollup Properties dialog box to do the following: For more information, refer to AnnTextRollupObject.

Go to the Top of this topic.


Curve Tool The AnnCurveObject annotation object is a sequence of points that are joined by cubic polynomials such that adjacent polynomials are continuous at the first and second derivatives. The result is a smooth, continuous curve going through all the points. In design mode, each curve is formed with a mouse click, and the object is completed on a double-click. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Curve Properties dialog box to do the following: For more information, refer to AnnCurveObject.

Go to the Top of this topic.


Closed Curve Tool The AnnClosedCurveObject annotation object is a sequence of points that are joined by cubic polynomials such that adjacent polynomials are continuous at the first and second derivatives. Unlike the curve annotation object, the first and last endpoints are also joined by a curve. The result is a smooth, continuous closed curve going through all the points. In design mode, each curve is formed with a mouse click, and the object is completed on a double-click. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.) In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Closed Curve Properties dialog box to do the following: For more information, refer to AnnClosedCurveObject.

Go to the Top of this topic.


Polyruler Tool

The AnnPolyRulerObject annotation object is an array of points that create a sequence of joined rulers. In design mode, each line segment is formed with a mouse click, and the object is completed on a double-click. The polyruler can be used to measure the distance of an irregularly shaped object. As ruler segments are added, removed, or changed in length, a running total of the total distance is displayed. In run mode, the mouse pointer changes to a hand when it is over the object, and clicking on the object fires the Run event. You can add code to process the event. (The example program merely displays a message box.). In design mode, you can click on the object with the right mouse button to do the following:

In design mode, access the Poly Ruler Properties dialog box to do the following: For more information, refer to AnnPolyRulerObject.

Go to the Top of this topic.


Encrypt Tool

The AnnEncryptObject annotation object is a rectangular object that is used to encrypt rectangular portions of a bitmap. It can also be used to encrypt the entire bitmap.

The encrypt object is useful for encrypting portions of a bitmap. After encrypting, the scrambled bitmap cannot easily be unscrambled without the associated annotation file. The scrambling can be removed by using the associated annotation file, or by using automation mode to manually change the encryptor to a decryptor, position it correctly, and setting the key appropriately.

In design mode, create the encrypt object by selecting the Encrypt tool and then clicking and dragging the mouse to create the rectangular encrypt object. Then while the object is selected, right-click the object and select the Encrypt Properties menu item, enter the key in the Key field on the Encrypt tab of the Encrypt Properties dialog that appears, and then click Apply.

After setting the key you can right-click the object and select the Apply Encryptor option to scramble the pixels underneath the object. In design mode, the encrypt object is visible but partially transparent to show the part of the bitmap that it covers.

In run mode, the encrypt object is invisible. In run mode, if an encrypt object (state encryptor) has been applied to the bitmap, the pixels underneath the encryptor's location are physically scrambled in a manner that depends upon the key used when the encrypt object was created.

An encrypt object has two pictures--one for when it is an encryptor (Primary), and one for when it is a decryptor (Secondary). In design mode you can change the pictures used by the automation object on the Pictures tab of the Encrypt Properties dialog (or in the code set the PrimaryPicture property and the SecondaryPicture property). The default picture for the encryptor is shown in the following figure:

The default picture for the decryptor is shown in the following figure:

If you have one or more encrypt objects selected and you change the "pictures" then the encryptor picture changes for all of the selected encrypt objects. Overlapping regions can be encrypted. When encrypting overlapping regions, note the following points:

After creating an encrypt object by designating its key and location, you must call Apply to apply the encrypt object. Once applied, the portion of the bitmap under the encrypt object becomes scrambled, and the encrypt object changes state to become a decryptor. Using different keys before calling this function gives different scrambling patterns The decryptor state differs from the encryptor state in that a decryptor cannot be moved, and cannot be changed to an encryptor. The scrambling can be removed by calling Apply on the decryptor with the appropriate arguments. If successful, the decryptor state changes to encryptor. An encrypt object in that encrytpor state can be moved, can have its key changed, and can be changed to a decryptor.

When a bitmap that has had portion(s) of the bitmap encrypted is saved, the encryption information is saved with the rest of the annotation information in the associated annotation information file. In design mode, you can click on the object with the right mouse button to do the following:

In design mode, access the Encrypt Properties dialog box to do the following:

For more information, refer to AnnEncryptObject.

Go to the Top of this topic.


Text Pointer Tool The AnnTextPointerObject annotation object is a rectangle with a line that starts from one of the four corners of the bounding rectangle. The other endpoint of the line can be moved to point to anything on the underlying image. The rectangle contains a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. This extra endpoint may or may not be fixed. In design mode, click and drag to specify the rectangle in the current window. After letting up on the mouse button, the rectangle is specified. Moving the mouse now specifies the line, with a final mouse click defining the line. Holding down the Shift key while drawing the rectangle will make the text annotation square. Holding down the Shift Key will snap the line to angles of 45 degrees. After the text pointer is defined, a dialog box then lets the user enter the text. As soon as the Text object is created, the text will be highlighted. The text may be edited immediately. When moving a text pointer, the pointer endpoint of the line can remain fixed, or move with the rest of the text pointer. To change this setting in automation mode, select or deselect the Fixed Pointer check box on the Text tab of the Text Pointer Properties dialog box.In design mode, you can click on the object with the right mouse button to do the following: In design mode, access the Text Pointer Properties dialog box to do the following: For more information, refer to AnnTextPointerObject.

Go to the Top of this topic.


Polyline Tool The AnnPolylineObject annotation object is an array of points that create a sequence of joined lines. In design mode, each line segment is formed with a mouse click, and the object is completed on a double-click. In run mode, the mouse pointer changes to a hand when it is over the object. In run mode, clicking on the object fires the Run event. You can add code to process the event. (The example program merely pops up a message box.) In design mode, access the Polyline Properties dialog box to do the following: For more information, refer to AnnPolylineObject.

Go to the Top of this topic.


Video Tool

The AnnVideoObject annotation object is a rectangle containing a scaled image that can be activated to play an AVI file or capture a multimedia file. With the automated functions, in design mode, the user clicks and drags to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the video annotation square. A dialog box then lets the user specify the preferred options. In run mode, clicking on the icon plays the AVI file.

In design mode, click on the object with the right mouse button to do the following: For low-level implementation details, refer to AnnVideoObject.

Go to the Top of this topic.


 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.