/// <summary>
        /// Performs a hit test on the <see cref="ArcPrimitive"/> at a given point.
        /// </summary>
        /// <param name="point">The mouse position in destination coordinates.</param>
        /// <returns>
        /// <b>True</b> if <paramref name="point"/> "hits" the <see cref="ArcPrimitive"/>,
        /// <b>false</b> otherwise.
        /// </returns>
        /// <remarks>
        /// A "hit" is defined as when the mouse position is <see cref="VectorGraphic.HitTestDistance"/>
        /// screen pixels away from any point on the arc.
        /// </remarks>
        public override bool HitTest(Point point)
        {
            this.CoordinateSystem = CoordinateSystem.Source;

            bool result = ArcPrimitive.HitTest(
                SpatialTransform.ConvertToSource(point), this.Rectangle,
                this.StartAngle, this.SweepAngle,
                this.SpatialTransform);

            this.ResetCoordinateSystem();

            return(result);
        }
Beispiel #2
0
 /// <summary>
 /// Gets the point on the <see cref="Graphic"/> closest to the specified point.
 /// </summary>
 /// <param name="point">A point in either source or destination coordinates.</param>
 /// <returns>The point on the graphic closest to the given <paramref name="point"/>.</returns>
 /// <remarks>
 /// <para>
 /// Depending on the value of <see cref="Graphic.CoordinateSystem"/>,
 /// the computation will be carried out in either source
 /// or destination coordinates.</para>
 /// </remarks>
 public override PointF GetClosestPoint(PointF point)
 {
     return(ArcPrimitive.GetClosestPoint(point, this.Rectangle, this.StartAngle, this.SweepAngle));
 }