namespace Tickypip { using System; using Gnome; public class CellBorder : Gnome.CanvasGroup { private Board mBoard; public CellBorder(Board board) : base(board.Root()) { mBoard = board; CanvasRect rect = new CanvasRect(this); rect.WidthPixels = 1; rect.OutlineColorGdk = new Gdk.Color(0, 0, 0); rect.X1 = 0; rect.Y1 = 0; rect.X2 = Cell.WIDTH - 1; rect.Y2 = Cell.HEIGHT - 1; DrawShadowLine(1, Cell.HEIGHT, Cell.WIDTH, Cell.HEIGHT); DrawShadowLine(Cell.WIDTH, 1, Cell.WIDTH, Cell.HEIGHT); } public Board Board { get { return mBoard; } } private void DrawShadowLine(uint x, uint y, uint width, uint height) { CanvasLine line = new CanvasLine(this); line.FillColorGdk = new Gdk.Color(102, 102, 102); line.Points = new CanvasPoints(new double[] { x, y, width, height }); } } }