Exemplo n.º 1
0
        public void Test_ExtSize()
        {
            ExtSize sz = new ExtSize(9, 9);

            Assert.AreEqual(9, sz.Width);
            Assert.AreEqual(9, sz.Height);
            Assert.IsFalse(sz.IsEmpty);
            Assert.AreEqual("{Width=9, Height=9}", sz.ToString());
        }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (!(obj is ExtSize))
            {
                return(false);
            }
            ExtSize size = (ExtSize)obj;

            return(size.Width == Width && size.Height == Height);
        }
Exemplo n.º 3
0
 public static ExtSize Subtract(ExtSize sz1, ExtSize sz2)
 {
     return(new ExtSize(sz1.Width - sz2.Width, sz1.Height - sz2.Height));
 }
Exemplo n.º 4
0
 public static ExtSize Add(ExtSize sz1, ExtSize sz2)
 {
     return(new ExtSize(sz1.Width + sz2.Width, sz1.Height + sz2.Height));
 }
Exemplo n.º 5
0
 public ExtSize ToSize()
 {
     return(ExtSize.Truncate(this));
 }
Exemplo n.º 6
0
 public static ExtPoint Subtract(ExtPoint pt, ExtSize sz)
 {
     return(new ExtPoint(pt.X - sz.Width, pt.Y - sz.Height));
 }
Exemplo n.º 7
0
 public static ExtPoint Add(ExtPoint pt, ExtSize sz)
 {
     return(new ExtPoint(pt.X + sz.Width, pt.Y + sz.Height));
 }
Exemplo n.º 8
0
 public static ExtPointF Subtract(ExtPointF pt, ExtSize sz)
 {
     return(new ExtPointF(pt.X - (float)sz.Width, pt.Y - (float)sz.Height));
 }
Exemplo n.º 9
0
 public static ExtPointF Add(ExtPointF pt, ExtSize sz)
 {
     return(new ExtPointF(pt.X + (float)sz.Width, pt.Y + (float)sz.Height));
 }