public PointSwitchBase() { this.m_PointPlus = new Point(0.0, 0.0); this.m_PointMinus = new Point(0.0, 0.0); this.m_PointCore = new Point(0.0, 0.0); this.m_PointPeak = new Point(0.0, 0.0); this.BoundsPlus = new Rectangle(0, 0, 0, 0); this.BoundsMinus = new Rectangle(0, 0, 0, 0); this.m_alTrainsPeakToSink = new ArrayList(); }
public Element() { this.m_strID = ""; this.BaseWidth = 3; this.IconMode = false; this.Tag = null; this.m_Connections = new ArrayList(); this.ForeColor = Colors.get_Black(); this.Bounds = new Rectangle(0, 0, 0, 0); this.Center = new Point(0.0, 0.0); this.Initialize(); }
public override void SetLocation(Rectangle r) { this.BasePoint = new Point((double) r.X, (double) r.Y); }
public override void SetLocation(Rectangle r) { this.PointPlus = new Point((double) r.X, (double) r.Y); this.PointMinus = new Point((double) (r.X + r.Width), (double) r.Y); }
public abstract void SetLocation(Rectangle r);
public override void SetLocation(Rectangle r) { this.PointCore = new Point((double) (r.X + (r.Width >> 1)), (double) r.Y); this.PointPeak = new Point((double) r.X, (double) r.Y); this.PointMinus = new Point((double) (r.X + r.Width), (double) r.Y); this.PointPlus = new Point((double) (r.X + r.Width), (double) (r.Y + r.Height)); }
public bool IntersectsWith(Rectangle rect) { return ((((rect.X < (this.X + this.Width)) && (this.X < (rect.X + rect.Width))) && (rect.Y < (this.Y + this.Height))) && (this.Y < (rect.Y + rect.Height))); }
static Rectangle() { Empty = new Rectangle(); }
public void Intersect(Rectangle rect) { Rectangle rectangle = Intersect(rect, this); this.X = rectangle.X; this.Y = rectangle.Y; this.Width = rectangle.Width; this.Height = rectangle.Height; }
public bool Contains(Rectangle rect) { return ((((this.X <= rect.X) && ((rect.X + rect.Width) <= (this.X + this.Width))) && (this.Y <= rect.Y)) && ((rect.Y + rect.Height) <= (this.Y + this.Height))); }
public static Rectangle Union(Rectangle a, Rectangle b) { int num = Math.Min(a.X, b.X); int num2 = Math.Max((int) (a.X + a.Width), (int) (b.X + b.Width)); int num3 = Math.Min(a.Y, b.Y); int num4 = Math.Max((int) (a.Y + a.Height), (int) (b.Y + b.Height)); return new Rectangle(num, num3, num2 - num, num4 - num3); }
public static Rectangle Intersect(Rectangle a, Rectangle b) { int num = Math.Max(a.X, b.X); int num2 = Math.Min((int) (a.X + a.Width), (int) (b.X + b.Width)); int num3 = Math.Max(a.Y, b.Y); int num4 = Math.Min((int) (a.Y + a.Height), (int) (b.Y + b.Height)); if ((num2 >= num) && (num4 >= num3)) { return new Rectangle(num, num3, num2 - num, num4 - num3); } return Empty; }
public static Rectangle Inflate(Rectangle rect, int x, int y) { Rectangle rectangle = rect; rectangle.Inflate(x, y); return rectangle; }
public override void SetLocation(Rectangle r) { this.PointCenter = new Point((double) r.X, (double) r.Y); }