/// <summary>
        /// Returns a mark annotation as <see cref="IGraphicsPath"/> in content space.
        /// </summary>
        public virtual IGraphicsPath GetAsGraphicsPath(DrawingFactory drawingFactory)
        {
            IGraphicsPath path = drawingFactory.CreateGraphicsPath();

            PointF[] referencePoints = MarkAnnoData.GetReferencePointsInContentSpace();

            switch (MarkAnnoData.MarkType)
            {
            case MarkAnnotationType.Tick:
                path.AddCurve(referencePoints);
                break;

            default:
                path.AddPolygon(referencePoints);
                break;
            }

            return(path);
        }
Beispiel #2
0
 /// <summary>
 /// Adds a curve that intersects with the specified <paramref name="points"/> to the path with the given <paramref name="tension"/>
 /// </summary>
 /// <param name="path">Path to add the curve to</param>
 /// <param name="tension">Tension between points in the curve.  Should be between 0 (no curve) and 1 (more curve)</param>
 /// <param name="points">Points that intersect with the curve</param>
 public static void AddCurve(this IGraphicsPath path, float tension, params PointF[] points)
 {
     path.AddCurve(points, tension);
 }
Beispiel #3
0
 /// <summary>
 /// Adds a curve that intersects with the specified <paramref name="points"/> to the path
 /// </summary>
 /// <param name="path">Path to add the curve to</param>
 /// <param name="points">Points that define where the curve intersects</param>
 public static void AddCurve(this IGraphicsPath path, params PointF[] points)
 {
     path.AddCurve(points);
 }