Bug 720538 - Remove unused functions and variables. r=wesj

This commit is contained in:
Kartikaya Gupta 2012-02-02 09:16:25 -05:00
Родитель 2a1bb09135
Коммит e63d5f692f
3 изменённых файлов: 0 добавлений и 19 удалений

Просмотреть файл

@ -335,11 +335,6 @@ public class LayerController {
return new RectF(x, y, x + layerSize.width, y + layerSize.height);
}
public RectF restrictToPageSize(RectF aRect) {
FloatSize pageSize = getPageSize();
return RectUtils.restrict(aRect, new RectF(0, 0, pageSize.width, pageSize.height));
}
// Returns true if a checkerboard is about to be visible.
private boolean aboutToCheckerboard() {
// Increase the size of the viewport (and clamp to page boundaries), and

Просмотреть файл

@ -115,18 +115,6 @@ public final class RectUtils {
return new IntSize(rect.width(), rect.height());
}
/* Returns a new RectF which restricts a source rect to the area inside a second destination rect.
* If the source rect is wider/taller than the destination rect, it's width/height will be shortened
* (and its aspect ratio will NOT be maintained).
*/
public static RectF restrict(RectF rect, RectF dest) {
float width = Math.min(rect.width(), dest.width());
float height = Math.min(rect.height(), dest.height());
float x = Math.max(dest.left, Math.min(dest.right-width, rect.left));
float y = Math.max(dest.top, Math.min(dest.bottom-height, rect.top));
return new RectF(x, y, x+width, y+height);
}
/*
* Returns the rect that represents a linear transition between `from` and `to` at time `t`,
* which is on the scale [0, 1).

Просмотреть файл

@ -163,7 +163,6 @@ public class PanZoomController
Log.i(LOGTAG, "Got message: " + event);
try {
if (MESSAGE_ZOOM_RECT.equals(event)) {
float scale = mController.getZoomFactor();
float x = (float)message.getDouble("x");
float y = (float)message.getDouble("y");
final RectF zoomRect = new RectF(x, y,
@ -175,7 +174,6 @@ public class PanZoomController
}
});
} else if (MESSAGE_ZOOM_PAGE.equals(event)) {
float scale = mController.getZoomFactor();
FloatSize pageSize = mController.getPageSize();
RectF viewableRect = mController.getViewport();