From 35f53a978b9f2ec5db590796cfb681f54dfb3065 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 26 Apr 2020 16:10:32 +0200 Subject: [PATCH] don't unnecessarily cast ninepatch regions to int --- MLEM/Textures/NinePatch.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MLEM/Textures/NinePatch.cs b/MLEM/Textures/NinePatch.cs index 0b8e6e6..ec3a3e2 100644 --- a/MLEM/Textures/NinePatch.cs +++ b/MLEM/Textures/NinePatch.cs @@ -37,10 +37,10 @@ namespace MLEM.Textures { } public IEnumerable CreateRectangles(RectangleF area, float patchScale = 1) { - var pl = (int) (this.Padding.Left * patchScale); - var pr = (int) (this.Padding.Right * patchScale); - var pt = (int) (this.Padding.Top * patchScale); - var pb = (int) (this.Padding.Bottom * patchScale); + var pl = this.Padding.Left * patchScale; + var pr = this.Padding.Right * patchScale; + var pt = this.Padding.Top * patchScale; + var pb = this.Padding.Bottom * patchScale; var centerW = area.Width - pl - pr; var centerH = area.Height - pt - pb;