Beispiel #1
0
        public override bool Equals(object obj)
        {
            if (!(obj is ExtPointF))
            {
                return(false);
            }
            ExtPointF pointF = (ExtPointF)obj;

            return(pointF.X == X && pointF.Y == Y && pointF.GetType().Equals(GetType()));
        }
Beispiel #2
0
        public void Test_ExtPointF()
        {
            var pt = new ExtPointF(11, 11);

            Assert.AreEqual(11, pt.X);
            Assert.AreEqual(11, pt.Y);

            pt.Offset(2, 3);
            Assert.AreEqual(13, pt.X);
            Assert.AreEqual(14, pt.Y);

            Assert.IsFalse(pt.IsEmpty);
            Assert.AreEqual("{X=13, Y=14}", pt.ToString());
        }
Beispiel #3
0
 public static ExtPoint Truncate(ExtPointF value)
 {
     return(new ExtPoint((int)value.X, (int)value.Y));
 }
Beispiel #4
0
 public static ExtPointF Subtract(ExtPointF pt, ExtSizeF sz)
 {
     return(new ExtPointF(pt.X - sz.Width, pt.Y - sz.Height));
 }
Beispiel #5
0
 public static ExtPointF Add(ExtPointF pt, ExtSizeF sz)
 {
     return(new ExtPointF(pt.X + sz.Width, pt.Y + sz.Height));
 }