EnumerableExtensions - Remove Enumerate<T> extension

This commit is contained in:
miku-666
2026-01-12 17:12:41 +01:00
parent a4371fae56
commit 61ac8fac4b
10 changed files with 42 additions and 49 deletions

View File

@@ -150,11 +150,13 @@ namespace PckStudio.Core.Extensions
using (var graphic = Graphics.FromImage(image))
{
graphic.ApplyConfig(GraphicsConfig.PixelPerfect());
foreach ((int i, Image texture) in sources.Enumerate())
int i = 0;
foreach (Image texture in sources)
{
int x = Math.DivRem(i, columns, out int y);
if (horizontal)
y = Math.DivRem(i, rows, out x);
i++;
graphic.DrawImage(texture, new Rectangle(new Point(x * texture.Width, y * texture.Height), texture.Size));
}
}