ImageGear for .NET
Resizing Custom Marks

To process resizing of marks that are rectangular, the user must override UpdateBounds method. It takes a rectangle containing new bounds for mark, and updates custok mark’s properties with it. It is necessary, because there is no common properties for custom mark, that determines custom mark’s bounds. All other functionality, including cursors handling, is implemented in the ImGearARTFormsRectangleController class.

To process resizing of marks that are not rectangular, the user must override at least Resize method, which takes a point, a point identifier, and updates one of the mark’s points with a given point. It will work for marks that are similar to the Polyline mark, i.e., marks based on a list of points. For more complex marks (for example, if custom mark is similar to Art Callout mark), the user may also want to override ManageCursor method. Here the user is able to:

ManageCursor is called by Annotator every time when mouse hovers the mark which is selected. Default ManageCursor implementation method analyzes if the mouse is over one of mark’s resizing points, and, if yes, sets up the cursor and store a point ID in the data structure passed by annotator. Resize method is called by Annotator if mouse moved while mouse button is pressed, and appropriate resizing cursor and point identifier was set up during previous call of ManageCursor. Overridden Resize must update the internal point with new passed coordinates, using point identifier passed by Annotator (see ImGearARTFormsMarkControllerData in API Reference).

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback