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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user