Exemplo n.º 1
0
        public static bloRectangle loadRectangle(xElement element, bloRectangle defRectangle = default(bloRectangle))
        {
            if (element == null)
            {
                return(defRectangle);
            }
            var rectangle = new bloRectangle();

            if (element.Element("x") != null && element.Element("y") != null && element.Element("width") != null && element.Element("height") != null)
            {
                rectangle.move(element.Element("x"), element.Element("y"));
                rectangle.resize(element.Element("width"), element.Element("height"));
            }
            else if (element.Element("left") != null && element.Element("top") != null && element.Element("right") != null && element.Element("bottom") != null)
            {
                rectangle.set(element.Element("left"), element.Element("top"), element.Element("right"), element.Element("bottom"));
            }
            else
            {
                rectangle = defRectangle;
            }
            return(rectangle);
        }
Exemplo n.º 2
0
 public virtual void move(int x, int y)
 {
     mRect.move(x, y);
 }