sigil function

void sigil(
  1. Painter p,
  2. int i,
  3. double x,
  4. double y,
  5. int c, [
  6. double a = 1.0,
  7. int edge = 0,
])

Implementation

void sigil(
  Painter p,
  int i,
  double x,
  double y,
  int c, [
  double a = 1.0,
  int edge = 0,
]) {
  final g = arcaneSigils[wrapInt(i, arcaneSigils.length)];
  final ix = (x + 0.5).floor() - 2;
  final iy = (y + 0.5).floor() - 3;
  if (edge != 0) {
    for (final (dx, dy) in _cross) {
      p.sprite(g, const {}, ix + dx, iy + dy, tint: edge, a: a);
    }
  }
  p.sprite(g, const {}, ix, iy, tint: c, a: a);
}