filledTrigonColor function

bool filledTrigonColor(
  1. Pointer<SdlRenderer> renderer,
  2. double x1,
  3. double y1,
  4. double x2,
  5. double y2,
  6. double x3,
  7. double y3,
  8. int color,
)

Implementation

bool filledTrigonColor(Pointer<SdlRenderer> renderer, double x1, double y1,
    double x2, double y2, double x3, double y3, int color) {
  var vx = calloc<Int16>(3);
  var vy = calloc<Int16>(3);

  vx[0] = x1.toInt();
  vx[1] = x2.toInt();
  vx[2] = x3.toInt();
  vy[0] = y1.toInt();
  vy[1] = y2.toInt();
  vy[2] = y3.toInt();

  var result = filledPolygonColor(renderer, vx, vy, 3, color);
  calloc.free(vx);
  calloc.free(vy);

  return result;
}