/// <summary> /// Creates a new object that is a copy of the current instance. /// </summary> /// <returns>A new object that is a copy of this instance.</returns> public override object Clone() { TriangleAnnotationData result = new TriangleAnnotationData(); CopyTo(result); return(result); }
/// <summary> /// Initializes a new instance of the <see cref="TriangleAnnotationView"/> class. /// </summary> /// <param name="annotationData">Object that stores the annotation data.</param> public TriangleAnnotationView(TriangleAnnotationData annotationData) : base(annotationData) { FillBrush = null; // create a point-based builder Builder = new PointBasedAnnotationPointBuilder(this, 3, 3); // create a transformer for rectangular mode PointBasedAnnotationRectangularTransformer rectangleTransformer = new PointBasedAnnotationRectangularTransformer(this); // show bounding box area rectangleTransformer.BoundingBoxArea.IsVisible = true; RectangularTransformer = rectangleTransformer; // create a transformer for point mode PointBasedAnnotationPointTransformer pointsTransformer = new PointBasedAnnotationPointTransformer(this); // change interaction points color pointsTransformer.InteractionPointBackColor = Color.FromArgb(100, Color.Red); pointsTransformer.SelectedInteractionPointBackColor = Color.FromArgb(150, Color.Red); // change interaction points type pointsTransformer.PolygonPointTemplate = new TriangleAnnotationInteractionPoint(); PointTransformer = pointsTransformer; GripMode = GripMode.RectangularAndPoints; }