//------------------------------------------------ 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); }
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; } }
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; //} }
//------------------------------------------------ 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; }