public override void PaintForeground(HintPainter hp, Hint.Kind v) { PaintContext context = (PaintContext)hp; int Cells = context.grid.Cells; if (house == Houses.Column) { for (int y = 0; y < Cells; ++y) { if (context.grid.FlagAt(i0, y) == SudokuGrid.CellFlags.Free) { context.SetPencil(i0, y, i1, v); } } } else if (house == Houses.Row) { for (int x = 0; x < Cells; ++x) { if (context.grid.FlagAt(x, i0) == SudokuGrid.CellFlags.Free) { context.SetPencil(x, i0, i1, v); } } } else if (house == Houses.Box) { for (int x = 0; x < Cells; ++x) { for (int y = 0; y < Cells; ++y) { if (context.grid.FlagAt(x, y) == SudokuGrid.CellFlags.Free && context.grid.BoxAt(x, y) == i0) { context.SetPencil(x, y, i1, v); } } } } else if (house == Houses.MajorDiagonal) { for (int x = 0; x < Cells; ++x) { if (context.grid.FlagAt(x, x) == SudokuGrid.CellFlags.Free) { context.SetPencil(x, x, i0, v); } } } else if (house == Houses.MinorDiagonal) { for (int x = 0; x < Cells; ++x) { if (context.grid.FlagAt(x, Cells - x - 1) == SudokuGrid.CellFlags.Free) { context.SetPencil(x, Cells - x - 1, i0, v); } } } }
public override void PaintBackground(HintPainter hp, Hint.Kind v) { PaintContext context = (PaintContext)hp; int Cells = context.grid.Cells; Brush back = PaintContext.BackgroundBrush(v); if (house == Houses.Cell) { context.FillCell(i0, i1, back); } else if (house == Houses.Column) { context.FillColumn(i0, back); } else if (house == Houses.Row) { context.FillRow(i0, back); } else if (house == Houses.Box) { context.FillBox(i0, back); } else if (house == Houses.MajorDiagonal) { for (int x = 0; x < Cells; ++x) { context.FillCell(x, x, back); } } else if (house == Houses.MinorDiagonal) { for (int x = 0; x < Cells; ++x) { context.FillCell(x, Cells - x - 1, back); } } }
public virtual void PaintForeground(HintPainter context) { }
public virtual void PaintBackground(HintPainter context) { }
public override void PaintForeground(HintPainter context) { Candidate.PaintForeground(context, Hint.Kind.AmongMust); }
public override void PaintForeground(HintPainter context) { Candidate.PaintForeground(context, 0); }
public override void PaintBackground(HintPainter context) { Requirement.PaintBackground(context, Hint.Kind.AmongMust); Candidate.PaintBackground(context, Hint.Kind.Must); }
public override void PaintForeground(HintPainter context) { c.PaintForeground(context, 0); }
public override void PaintBackground(HintPainter hp, Hint.Kind v) { PaintContext context = (PaintContext)hp; context.FillCell(x, y, v); }
public override void PaintForeground(HintPainter hp, Hint.Kind v) { PaintContext context = (PaintContext)hp; context.SetPencil(this, v); }
public virtual void PaintBackground(HintPainter context, Hint.Kind v) { }