Preview is no cropped
This commit is contained in:
1 parent
183cdbb996
commit
2fbefe616c
1 file changed
+5
@@ -7,6 +7,7 @@ using Vocaluxe.Base;
|
|||||||
using Vocaluxe.Menu;
|
using Vocaluxe.Menu;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Vocaluxe.Lib.Draw;
|
||||||
|
|
||||||
namespace Vocaluxe.Screens
|
namespace Vocaluxe.Screens
|
||||||
{
|
{
|
||||||
@@ -314,6 +315,10 @@ namespace Vocaluxe.Screens
|
|||||||
if(_Snapshot == null)
|
if(_Snapshot == null)
|
||||||
CWebcam.GetFrame(ref _WebcamTexture);
|
CWebcam.GetFrame(ref _WebcamTexture);
|
||||||
Statics[htStatics(StaticAvatar)].Texture = _WebcamTexture;
|
Statics[htStatics(StaticAvatar)].Texture = _WebcamTexture;
|
||||||
|
|
||||||
|
RectangleF bounds = new RectangleF(_WebcamTexture.rect.X, _WebcamTexture.rect.Y, _WebcamTexture.rect.W, _WebcamTexture.rect.H);
|
||||||
|
RectangleF rect = new RectangleF(0f, 0f, _WebcamTexture.rect.W, _WebcamTexture.rect.H);
|
||||||
|
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Statics[htStatics(StaticAvatar)].Texture = CProfiles.Avatars[avatarNr].Texture;
|
Statics[htStatics(StaticAvatar)].Texture = CProfiles.Avatars[avatarNr].Texture;
|
||||||
|
|||||||
Reference in new issue
Block a user