Exemplo n.º 1
0
        public override IHitTestObject HitTest(HitTestPointData htd)
        {
            HitTestObjectBase result = null;
            GraphicsPath      gp     = GetPath();

            if (gp.IsOutlineVisible((PointF)htd.GetHittedPointInWorldCoord(_transformation), _linePen))
            {
                result = new LineShapeHitTestObject(this);
            }
            else
            {
                gp.Transform(htd.GetTransformation(_transformation)); // Transform to page coord
                if (gp.IsOutlineVisible((PointF)htd.HittedPointInPageCoord, new Pen(Color.Black, 6)))
                {
                    result = new LineShapeHitTestObject(this);
                }
            }

            if (result != null)
            {
                result.DoubleClick = EhHitDoubleClick;
            }

            return(result);
        }
Exemplo n.º 2
0
		public override IHitTestObject HitTest(HitTestPointData htd)
		{
			HitTestObjectBase result = null;
			GraphicsPath gp = GetPath();
			if (gp.IsOutlineVisible((PointF)htd.GetHittedPointInWorldCoord(_transformation), _linePen))
			{
				result = new LineShapeHitTestObject(this);
			}
			else
			{
				gp.Transform(htd.GetTransformation(_transformation)); // Transform to page coord
				if (gp.IsOutlineVisible((PointF)htd.HittedPointInPageCoord, new Pen(Color.Black, 6)))
				{
					result = new LineShapeHitTestObject(this);
				}
			}

			if (result != null)
				result.DoubleClick = EhHitDoubleClick;

			return result;
		}