AddHit() 공개 메소드

public AddHit ( SvgElement svg, float x, float y ) : void
svg SvgElement
x float
y float
리턴 void
예제 #1
0
 //------------------------------------------------
 public override bool HitTestCore(SvgHitChain svgChain, float x, float y)
 {
     if (y >= this.ActualY & y < (this.ActualY + this.ActualHeight))
     {
         if (x >= this.ActualX && x < this.ActualX + this.ActualWidth)
         {
             svgChain.AddHit(this, x, y);
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
 public static void HitTestCore(SvgElement root, SvgHitChain chain, float x, float y)
 {
     //1. 
     chain.AddHit(root, x, y);
     //2. find hit child
     var child = root.GetFirstNode();
     while (child != null)
     {
         var node = child.Value;
         if (node.HitTestCore(chain, x, y))
         {
             break;
         }
         child = child.Next;
     }
 }
예제 #3
0
        public static void HitTestCore(SvgElement root, SvgHitChain chain, float x, float y)
        {
            //1.
            chain.AddHit(root, x, y);
            //2. find hit child
            var child = root.GetFirstNode();

            while (child != null)
            {
                var node = child.Value;
                if (node.HitTestCore(chain, x, y))
                {
                    break;
                }
                child = child.Next;
            }
        }
예제 #4
0
        public static void HitTestCore(SvgElement root, SvgHitChain chain, float x, float y)
        {
            //1.
            chain.AddHit(root, x, y);

            //2. find hit child
            var child = root.GetFirstNode();


            //TODO: review here again!
            // throw new System.NotImplementedException();
            //TODO: check hit test core on svg again!
            //while (child != null)
            //{
            //    //test hit text core again
            //    var node = child.Value;
            //    if (node.HitTestCore(chain, x, y))
            //    {
            //        break;
            //    }
            //    child = child.Next;
            //}
        }
예제 #5
0
 //------------------------------------------------
 public override bool HitTestCore(SvgHitChain svgChain, float x, float y)
 {
     if (y >= this.ActualY & y < (this.ActualY + this.ActualHeight))
     {
         if (x >= this.ActualX && x < this.ActualX + this.ActualWidth)
         {
             svgChain.AddHit(this, x, y);
             return true;
         }
     }
     return false;
 }