public override IHitTestObject HitTest(HitTestPointData htd) { HitTestObjectBase result = null; GraphicsPath gp = GetPath(); if (_fillBrush.IsVisible && gp.IsVisible((PointF)htd.GetHittedPointInWorldCoord(_transformation))) { result = new ClosedCardinalSplineHitTestObject(this); } else if (_linePen.IsVisible && gp.IsOutlineVisible((PointF)htd.GetHittedPointInWorldCoord(_transformation), _linePen)) { result = new ClosedCardinalSplineHitTestObject(this); } else { gp.Transform(htd.GetTransformation(_transformation)); // Transform to page coord if (gp.IsOutlineVisible((PointF)htd.HittedPointInPageCoord, new Pen(Color.Black, 6))) { result = new ClosedCardinalSplineHitTestObject(this); } } if (result != null) { result.DoubleClick = EhHitDoubleClick; } return(result); }
public override IHitTestObject HitTest(HitTestPointData htd) { HitTestObjectBase result = null; GraphicsPath gp = GetPath(); if (this._fillBrush.IsVisible && gp.IsVisible((PointF)htd.GetHittedPointInWorldCoord(_transformation))) { result = new ClosedCardinalSplineHitTestObject(this); } else if (this._linePen.IsVisible && gp.IsOutlineVisible((PointF)htd.GetHittedPointInWorldCoord(_transformation), _linePen)) { result = new ClosedCardinalSplineHitTestObject(this); } else { gp.Transform(htd.GetTransformation(_transformation)); // Transform to page coord if (gp.IsOutlineVisible((PointF)htd.HittedPointInPageCoord, new Pen(Color.Black, 6))) { result = new ClosedCardinalSplineHitTestObject(this); } } if (result != null) result.DoubleClick = EhHitDoubleClick; return result; }