void HandleCancelEvent() { AnnotationStateManager.CancelDrawing(true); AnnotationStateManager.State = new NSString(String.Empty); // Hide annotationView HideAnnotationView(); }
void HandleDoneEvent() { AnnotationStateManager.FinishDrawing(false, true); AnnotationStateManager.State = new NSString(String.Empty); // Hide annotationView HideAnnotationView(); // Save annotations SaveAnnotations(); }
private void EnterDrawingMode(UIColor color) { if (AnnotationStateManager.State != PSPDFAnnotationString.Ink) { AnnotationStateManager.ToggleState(PSPDFAnnotationString.Ink); } AnnotationStateManager.DrawColor = color; if (AnnotationStateManager.DrawColor.CGColor.Alpha < 1) { AnnotationStateManager.LineWidth = 20f; } else { AnnotationStateManager.LineWidth = 3f; } }
void HandleRedoEvent() { AnnotationStateManager.Redo(); }
void HandleUndoEvent() { AnnotationStateManager.Undo(); }
void HandleTouchUpInside(object sender, EventArgs e) { AnnotationStateManager.DrawColor = UIColor.Red; AnnotationStateManager.ToggleState(PSPDFAnnotationString.Ink); UpdateDrawButtonAppearance(); }