ImageGear .NET
Custom Mark Creation

Custom mark creation is processed by two overridden methods: CanCreateMark and CreateMark.

Annotator calls CanCreateMark each time the user releases a mouse button. Annotator passes a set of already entered points as parameters, along with some data that can be used in CanCreateMark method (see ImGearARTFormsCreateMarkData class description). It’s the controller’s responsibility to analyze if already entered points are enough for creating a mark (and/or by some conditions in the creation data). For example, all rectangular annotations can be created by 2 points, so default implementation in ImGearARTFormsRectangleController returns true without any checks (when MouseUp occurs, point list contains exactly two points). As another example, in PolyController default implementation checks if the last mouse click event was a double-click. This behavior is overridden in SectorMark, which needs 3 points for creation, and it is checked in SectorEditController.CanCreateMark.

CreateMark is a public controller’s method. It is called by Annotator if last call of CanCreateMark was successful. This method should be overridden in all custom controllers. It creates a new instance of the custom mark by given set of points.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback