allow tilesheet row height to dynamically increase, to reduce premature splits
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1116 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -31,13 +31,16 @@ namespace OpenRa.FileFormats
|
|||||||
if (current == null)
|
if (current == null)
|
||||||
current = pageProvider();
|
current = pageProvider();
|
||||||
|
|
||||||
if (imageSize.Height > rowHeight || rowHeight == 0 || imageSize.Width + x > pageSize.Width)
|
if (rowHeight == 0 || imageSize.Width + x > pageSize.Width)
|
||||||
{
|
{
|
||||||
y += rowHeight;
|
y += rowHeight;
|
||||||
rowHeight = imageSize.Height;
|
rowHeight = imageSize.Height;
|
||||||
x = 0;
|
x = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imageSize.Height > rowHeight)
|
||||||
|
rowHeight = imageSize.Height;
|
||||||
|
|
||||||
if (y + imageSize.Height > pageSize.Height)
|
if (y + imageSize.Height > pageSize.Height)
|
||||||
{
|
{
|
||||||
current = pageProvider();
|
current = pageProvider();
|
||||||
|
|||||||
Reference in New Issue
Block a user