texturedPolygon method

bool texturedPolygon(
  1. List<Point<double>> ps,
  2. Pointer<SdlSurface> texture,
  3. Point<double> texturePos
)

Implementation

bool texturedPolygon(
  List<math.Point<double>> ps,
  Pointer<SdlSurface> texture,
  math.Point<double> texturePos,
) {
  final xsPointer = ps.callocInt16X();
  final ysPointer = ps.callocInt16Y();
  final result = gfx.texturedPolygon(
    this,
    xsPointer,
    ysPointer,
    ps.length,
    texture,
    texturePos.x.toInt(),
    texturePos.y.toInt(),
  );
  calloc
    ..free(xsPointer)
    ..free(ysPointer);
  return result;
}