setGlyph method

void setGlyph(
  1. int x,
  2. int y,
  3. Glyph glyph
)

Sets the cell at x, y, to glyph.

Implementation

void setGlyph(int x, int y, Glyph glyph) {
  if (x < 0) return;
  if (x >= width) return;
  if (y < 0) return;
  if (y >= height) return;

  if (_glyphs.get(x, y) != glyph) {
    _changedGlyphs.set(x, y, glyph);
  } else {
    _changedGlyphs.set(x, y, null);
  }
}