void drawVertices(VertexMode vertexMode, List<Point> vertices, List<Point> textureCoordinates, List<Color> colors, TransferMode transferMode, List<int> indicies, Paint paint)

Source

void drawVertices(VertexMode vertexMode,
                  List<Point> vertices,
                  List<Point> textureCoordinates,
                  List<Color> colors,
                  TransferMode transferMode,
                  List<int> indicies,
                  Paint paint) {
  final int vertexCount = vertices.length;

  if (textureCoordinates.isNotEmpty && textureCoordinates.length != vertexCount)
    throw new ArgumentError("[vertices] and [textureCoordinates] lengths must match");
  if (colors.isNotEmpty && colors.length != vertexCount)
    throw new ArgumentError("[vertices] and [colors] lengths must match");

  final Float32List vertexBuffer = _encodePointList(vertices);
  final Float32List textureCoordinateBuffer = textureCoordinates.isEmpty ? null : _encodePointList(textureCoordinates);
  final Int32List colorBuffer = colors.isEmpty ? null : _encodeColorList(colors);
  final Int32List indexBuffer = new Int32List.fromList(indicies);

  _drawVertices(
    paint._objects, paint._data, vertexMode.index, vertexBuffer,
    textureCoordinateBuffer, colorBuffer, transferMode.index, indexBuffer
  );
}