Small fix for to small sized textures
This commit is contained in:
1 parent
ac8a53fc55
commit
8df0668039
2 files changed
+8
No files matched your search
@@ -886,11 +886,15 @@ namespace Vocaluxe.Lib.Draw
|
||||
{
|
||||
w = newW;
|
||||
h = (int)Math.Round(w / ratio);
|
||||
if (h == 0)
|
||||
h = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
h = newH;
|
||||
w = (int)Math.Round(h * ratio);
|
||||
if (w == 0)
|
||||
w = 1;
|
||||
}
|
||||
//Create a new Bitmap with the new sizes
|
||||
bmp2 = new Bitmap(w, h);
|
||||
|
||||
@@ -713,12 +713,16 @@ namespace Vocaluxe.Lib.Draw
|
||||
if (w > maxSize)
|
||||
{
|
||||
h = (int)Math.Round((float)maxSize / bmp.Width * bmp.Height);
|
||||
if (h == 0)
|
||||
h = 1;
|
||||
w = maxSize;
|
||||
}
|
||||
|
||||
if (h > maxSize)
|
||||
{
|
||||
w = (int)Math.Round((float)maxSize / bmp.Height * bmp.Width);
|
||||
if (w == 0)
|
||||
w = 1;
|
||||
h = maxSize;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user