SetCellAppearance() public method

Changes the appearance of the cell. The appearance represents the look of a cell and will first be cloned, then applied to the cell.
public SetCellAppearance ( int x, int y, ICellAppearance appearance ) : void
x int The x location of the cell.
y int The y location of the cell.
appearance ICellAppearance The desired appearance of the cell. A null value cannot be passed.
return void
Example #1
0
        public void Draw(SurfaceEditor surface)
        {
            if (BorderAppearance == null)
                BorderAppearance = new CellAppearance(Color.Blue, Color.Black, 4);

            Algorithms.Circle(Center.X, Center.Y, Radius, (x, y) => { if (surface.IsValidCell(x, y)) surface.SetCellAppearance(x, y, BorderAppearance); });
        }
Example #2
0
 //public ICellAppearance FillAppearance;
 //public bool Fill;
 public void Draw(SurfaceEditor surface)
 {
     Algorithms.Ellipse(StartingPoint.X, StartingPoint.Y, EndingPoint.X, EndingPoint.Y, (x, y) => { if (surface.IsValidCell(x, y)) surface.SetCellAppearance(x, y, BorderAppearance); });
 }