filledTrigonRgba function

int filledTrigonRgba(
  1. Pointer<SdlRenderer> renderer,
  2. int x1,
  3. int y1,
  4. int x2,
  5. int y2,
  6. int x3,
  7. int y3,
  8. int r,
  9. int g,
  10. int b,
  11. int a,
)

Implementation

int filledTrigonRgba(Pointer<SdlRenderer> renderer, int x1, int y1, int x2,
    int y2, int x3, int y3, int r, int g, int b, int a) {
  var vx = calloc<Int16>(3);
  var vy = calloc<Int16>(3);

  vx[0] = x1;
  vx[1] = x2;
  vx[2] = x3;
  vy[0] = y1;
  vy[1] = y2;
  vy[2] = y3;

  var result = filledPolygonRgba(renderer, vx, vy, 3, r, g, b, a);
  calloc.free(vx);
  calloc.free(vy);

  return result;
}