fixed scaling bug
This commit is contained in:
1 parent
85055dfd20
commit
c52e82becc
2 files changed
+4
-4
No files matched your search
@@ -903,13 +903,13 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
int w = bmp.Width;
|
int w = bmp.Width;
|
||||||
int h = bmp.Height;
|
int h = bmp.Height;
|
||||||
|
|
||||||
if (h >= w && w > MaxSize)
|
if (w > MaxSize)
|
||||||
{
|
{
|
||||||
h = (int)Math.Round((float)MaxSize / bmp.Width * bmp.Height);
|
h = (int)Math.Round((float)MaxSize / bmp.Width * bmp.Height);
|
||||||
w = MaxSize;
|
w = MaxSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w >= h && h > MaxSize)
|
if (h > MaxSize)
|
||||||
{
|
{
|
||||||
w = (int)Math.Round((float)MaxSize / bmp.Height * bmp.Width);
|
w = (int)Math.Round((float)MaxSize / bmp.Height * bmp.Width);
|
||||||
h = MaxSize;
|
h = MaxSize;
|
||||||
|
|||||||
@@ -724,13 +724,13 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
int w = bmp.Width;
|
int w = bmp.Width;
|
||||||
int h = bmp.Height;
|
int h = bmp.Height;
|
||||||
|
|
||||||
if (h >= w && w > MaxSize)
|
if (w > MaxSize)
|
||||||
{
|
{
|
||||||
h = (int)Math.Round((float)MaxSize / bmp.Width * bmp.Height);
|
h = (int)Math.Round((float)MaxSize / bmp.Width * bmp.Height);
|
||||||
w = MaxSize;
|
w = MaxSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w >= h && h > MaxSize)
|
if (h > MaxSize)
|
||||||
{
|
{
|
||||||
w = (int)Math.Round((float)MaxSize / bmp.Height * bmp.Width);
|
w = (int)Math.Round((float)MaxSize / bmp.Height * bmp.Width);
|
||||||
h = MaxSize;
|
h = MaxSize;
|
||||||
|
|||||||
Reference in new issue
Block a user