Deal with blank tiles by returning a 1x1 blank pixel rather than a bunch of invalid values.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3965 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2006-03-21 02:32:27 +00:00
parent d94866f3cf
commit 95ff914ab6
@@ -560,10 +560,18 @@ public class ImageUtil
}
// fill in the dimensions
tbounds.x = minx;
tbounds.y = firstrow;
tbounds.width = maxx - minx + 1;
tbounds.height = lastrow - firstrow + 1;
if (firstrow != -1) {
tbounds.x = minx;
tbounds.y = firstrow;
tbounds.width = maxx - minx + 1;
tbounds.height = lastrow - firstrow + 1;
} else {
// Entirely blank image. Return 1x1 blank image.
tbounds.x = 0;
tbounds.y = 0;
tbounds.width = 1;
tbounds.height = 1;
}
}
/**