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())); }
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()); }
public static ExtPoint Truncate(ExtPointF value) { return(new ExtPoint((int)value.X, (int)value.Y)); }
public static ExtPointF Subtract(ExtPointF pt, ExtSizeF sz) { return(new ExtPointF(pt.X - sz.Width, pt.Y - sz.Height)); }
public static ExtPointF Add(ExtPointF pt, ExtSizeF sz) { return(new ExtPointF(pt.X + sz.Width, pt.Y + sz.Height)); }