public IsValidCell ( int index ) : bool | ||
index | int | The index to test. |
return | bool |
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); }); }
//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); }); }
private void PlotCell(SurfaceEditor surface, int x, int y, int glyph, bool fillMe = false) { if (surface.IsValidCell(x,y)) { var cell = surface[x, y]; if (fillMe) { cell.Background = FillColor; cell.Foreground = Foreground; cell.GlyphIndex = glyph; return; } if (Foreground != Color.Transparent || DrawTransparency) cell.Foreground = Foreground; if (BorderBackground != Color.Transparent || DrawTransparency) cell.Background = BorderBackground; cell.GlyphIndex = glyph; } }