3 * Copyright 2011 Google Inc.
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
8 #ifndef SkMeshUtils_DEFINED
9 #define SkMeshUtils_DEFINED
23 bool init(int texW, int texH, int rows, int cols) {
24 return this->init(NULL, NULL, texW, texH, rows, cols);
27 bool init(SkPoint tex[], uint16_t indices[],
28 int texW, int texH, int rows, int cols);
30 int indexCount() const { return fIndexCount; }
31 const uint16_t* indices() const { return fIndices; }
33 size_t texCount() const { return fTexCount; }
34 const SkPoint* tex() const { return fTex; }
37 int fIndexCount, fTexCount;
40 void* fStorage; // may be null
45 static void Draw(SkCanvas*, const SkBitmap&, int rows, int cols,
46 const SkPoint verts[], const SkColor colors[],
47 const SkPaint& paint);