Adding PillarBox as own EAspect (fix #499)

Prior this change PillarBox was made in a special case at LetterBox, but that has an effect on the cover image creation.
Fix #499
This commit is contained in:
Stefan authored and GitHub committed 2020-02-18 10:10:59 +01:00
1 parent 125564c239
commit c59f2c937a
1 file changed
+5 -6
+5 -6
View File
@@ -139,12 +139,7 @@ namespace VocaluxeLib
} }
break; break;
case EAspect.LetterBox: case EAspect.LetterBox:
if (boundsAspectRatio == aspectRatio) // Pillarbox if (boundsAspectRatio < aspectRatio)
{
scaledWidth = bounds.W * 0.77f;
scaledHeight = bounds.W / aspectRatio;
}
else if (boundsAspectRatio < aspectRatio)
{ {
scaledWidth = bounds.W; scaledWidth = bounds.W;
scaledHeight = bounds.W / aspectRatio; scaledHeight = bounds.W / aspectRatio;
@@ -155,6 +150,10 @@ namespace VocaluxeLib
scaledWidth = bounds.H * aspectRatio; scaledWidth = bounds.H * aspectRatio;
} }
break; break;
case EAspect.PillarBox:
scaledWidth = bounds.W * 0.77f;
scaledHeight = bounds.W / aspectRatio;
break;
default: default:
return bounds; return bounds;
} }