Remove unused Grid object from LabelMaker.java class.
Also remove unnescessary "executable" bits from a documentation file.
Change-Id: I49bf8a6f0dabece62d16956b7e02c9a846bdd69b
diff --git a/samples/ApiDemos/_index.html b/samples/ApiDemos/_index.html
old mode 100755
new mode 100644
diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/LabelMaker.java b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/LabelMaker.java
index 6481397..0c48e4a 100644
--- a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/LabelMaker.java
+++ b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/LabelMaker.java
@@ -35,8 +35,8 @@
*
*
* OpenGL labels are implemented by creating a Bitmap, drawing all the labels
- * into the Bitmap, converting the Bitmap into an Alpha texture, and creating a
- * mesh for each label
+ * into the Bitmap, converting the Bitmap into an Alpha texture, and drawing
+ * portions of the texture using glDrawTexiOES.
*
* The benefits of this approach are that the labels are drawn using the high
* quality anti-aliased font rasterizer, full character set support, and all the
@@ -246,24 +246,11 @@
textPaint);
}
- Grid grid = new Grid(2, 2);
- // Grid.set arguments: i, j, x, y, z, u, v
-
- float texU = u * mTexelWidth;
- float texU2 = u2 * mTexelWidth;
- float texV = 1.0f - v * mTexelHeight;
- float texV2 = 1.0f - v2 * mTexelHeight;
-
- grid.set(0, 0, 0.0f, 0.0f, 0.0f, texU , texV2);
- grid.set(1, 0, width, 0.0f, 0.0f, texU2, texV2);
- grid.set(0, 1, 0.0f, height, 0.0f, texU , texV );
- grid.set(1, 1, width, height, 0.0f, texU2, texV );
-
// We know there's enough space, so update the member variables
mU = u + width;
mV = v;
mLineHeight = lineHeight;
- mLabels.add(new Label(grid, width, height, ascent,
+ mLabels.add(new Label(width, height, ascent,
u, v + height, width, -height));
return mLabels.size() - 1;
}
@@ -381,9 +368,8 @@
}
private static class Label {
- public Label(Grid grid, float width, float height, float baseLine,
+ public Label(float width, float height, float baseLine,
int cropU, int cropV, int cropW, int cropH) {
- this.grid = grid;
this.width = width;
this.height = height;
this.baseline = baseLine;
@@ -395,7 +381,6 @@
mCrop = crop;
}
- public Grid grid;
public float width;
public float height;
public float baseline;