public override void Draw(SpriteBatch sprite, XNA.Color dotColor, int xShift, int yShift) { XNA.Color lineColor = ab.Color; if (Selected) { lineColor = dotColor; } int x, y; if (a.X < b.X) { x = a.X + xShift; } else { x = b.X + xShift; } if (b.Y < c.Y) { y = b.Y + yShift; } else { y = c.Y + yShift; } Board.ParentControl.FillRectangle(sprite, new XNA.Rectangle(x, y, Math.Abs(b.X - a.X), Math.Abs(c.Y - a.Y)), Color); ab.Draw(sprite, lineColor, xShift, yShift); bc.Draw(sprite, lineColor, xShift, yShift); cd.Draw(sprite, lineColor, xShift, yShift); da.Draw(sprite, lineColor, xShift, yShift); }
public virtual void Draw(SpriteBatch sprite, int xShift, int yShift, SelectionInfo sel) { XNA.Color lineColor = ab.GetColor(sel); int x, y; if (a.X < b.X) { x = a.X + xShift; } else { x = b.X + xShift; } if (b.Y < c.Y) { y = b.Y + yShift; } else { y = c.Y + yShift; } ab.Draw(sprite, lineColor, xShift, yShift); bc.Draw(sprite, lineColor, xShift, yShift); cd.Draw(sprite, lineColor, xShift, yShift); da.Draw(sprite, lineColor, xShift, yShift); }