mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-12 17:11:56 +00:00
Core - Add ResourcePackImporter.cs
This commit is contained in:
@@ -142,12 +142,13 @@ namespace PckStudio.Core.Extensions
|
||||
|
||||
using (var graphic = Graphics.FromImage(image))
|
||||
{
|
||||
graphic.ApplyConfig(GraphicsConfig.PixelPerfect());
|
||||
foreach ((int i, Image texture) in sources.enumerate())
|
||||
{
|
||||
int x = Math.DivRem(i, columns, out int y);
|
||||
if (horizontal)
|
||||
y = Math.DivRem(i, rows, out x);
|
||||
graphic.DrawImage(texture, new Point(x * texture.Width, y * texture.Height));
|
||||
graphic.DrawImage(texture, new Rectangle(new Point(x * texture.Width, y * texture.Height), texture.Size));
|
||||
}
|
||||
}
|
||||
return image;
|
||||
|
||||
Reference in New Issue
Block a user