public Rectangle GetBoundingRect(int x, int y, XmlNode n) { if (ElementNode.Equals(n)) { return(GetBoundingRect(x, y)); } int xpos = x; foreach (TableCell c in cells) { Rectangle rc = c.GetBoundingRect(xpos, y, n); if (!rc.IsEmpty) { return(rc); } xpos += c.Width; } // not found in any child cells, so if we're a parent of // the node, then this is the containing block for the node // so return this bounding rect if (XmlUtil.GetAncestors(n).Contains(elementNode)) { return(GetBoundingRect(x, y)); } return(Rectangle.Empty); }
public override bool IsSamePosition(XPathNavigator other) { NavigableDocument o = other as NavigableDocument; if (o == null) { return(false); } if (!document.Equals(o.document) || !element.Equals(o.element)) { return(false); } if (o.attrs == null && attrs == null) { return(true); } return(attrs.Equals(o.attrs)); }