Ejemplo n.º 1
0
        /// <summary>
        /// This method is used in internally by the <see cref="AnnotationResizeAdorner" />. Gets the adorner point positions
        /// </summary>
        /// <param name="coordinates">The previously calculated <see cref="AnnotationCoordinates"/> in screen pixels.</param>
        /// <returns>A list of points in screen pixels denoting the Adorner corners</returns>
        protected override Point[] GetBasePoints(AnnotationCoordinates coordinates)
        {
            var lineAnnotations = Annotations;
            var count           = lineAnnotations.Count();

            var points = new Point[count];

            for (int i = 0; i < count; i++)
            {
                var annotation = lineAnnotations[i];

                var xCoord = XAxis.GetCoordinate(annotation.X1);
                var yCoord = YAxis.GetCoordinate(annotation.Y1);

                points[i] = new Point(xCoord, yCoord);
            }

            return(points);
        }