Fix: Proper Scaling

Function scaled 2 * scale instead of scale.
This commit is contained in:
Jiiniasu committed 2018-07-15 00:04:21 +02:00
1 parent 5d46be228f
commit eb2e9b8c5c
1 file changed
+4 -4
+4 -4
View File
@@ -171,10 +171,10 @@ namespace VocaluxeLib
public static SRectF Scale(this SRectF rect, float scale)
{
return new SRectF(
rect.X - rect.W * (scale - 1f),
rect.Y - rect.H * (scale - 1f),
rect.W + 2 * rect.W * (scale - 1f),
rect.H + 2 * rect.H * (scale - 1f),
rect.X - rect.W * (scale - 1f) * 0.5f,
rect.Y - rect.H * (scale - 1f) * 0.5f,
rect.W * scale,
rect.H * scale,
rect.Z);
}