Check attached image. Here I want to change drawn annotations (perimeter and area) to dashed colored strips same as that red-white stripped lines. ( Here in image, that red stripped annotations are in readOnly mode - instance.setReadOnly(true). But I dont want to apply readOnly mode instead change annotation’s apperance to the same as readOnly mode alike(red-white stripped).
I want to set annotation styles after some action from normal straight red colored annotation to stripped red colored annotation. I am using - instance.annotManager.setAnnotationStyles(annotation, ....)
How can I use this to change annotation styles ?
In this function you have access to the canvas context, and you can do whatever you wish with that. In this scenerio, I’m calling setLineDash to make the line dashed.
If you want, you can completely override this function and draw the entire annotation yourself: