stringRgba function

bool stringRgba(
  1. Pointer<SdlRenderer> renderer,
  2. double x,
  3. double y,
  4. String s,
  5. int r,
  6. int g,
  7. int b,
  8. int a,
)

Implementation

bool stringRgba(Pointer<SdlRenderer> renderer, double x, double y, String s,
    int r, int g, int b, int a) {
  bool result = true;
  double curx = x;
  double cury = y;
  for (var i = 0; i < s.length; i++) {
    var curchar = s[i];
    if (result) {
      result = characterRgba(
          renderer, curx, cury, curchar.codeUnitAt(0), r, g, b, a);
    }
    switch (charRotation) {
      case 0:
        curx += charWidthLocal;
        break;
      case 2:
        curx -= charWidthLocal;
        break;
      case 1:
        cury += charHeightLocal;
        break;
      case 3:
        cury -= charHeightLocal;
        break;
    }
  }
  return result;
}