Esempio n. 1
0
        public override void OnMouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left || !this.IsSelected || isDrawn)
            {
                return;
            }

            pt = Element.ToImageCoordinate(e.Location).ToPt();

            var imageSize = Element.Image.Size.ToSize();

            this.Annotation.Polygon = new PointF[] { pt.Clamp(imageSize) };
            isDrawn = true;
        }