mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-30 01:56:17 +00:00
EnumerableExtensions - Remove Enumerate<T> extension
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user