DotAnnotate 5.0 makes is easy to create custom point base annotations. The source code attached to this article contains a custom triangle annotation, its data class and renderer.
The general steps for creating a point base annotation are as follows:
- Create a data class that derives from PointBaseData. The PointBaseData class contains a Points property that will contain all of the points of your annotation.
- Create a UI class that derives from PointBaseAnnotation. The PointBaseAnnotation class handles most of the code required for the user to create and modify the annotation points. It also handles switching between rectangle and point grips, however you must initially setup the point grip objects.
- Create a renderer that derives from AnnotationRenderingEngine. Here you will override the RenderAnnotation method to draw your custom annotation.