mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
Fixed float to int
This commit is contained in:
@@ -194,8 +194,8 @@ namespace AssetStudio
|
|||||||
if (cropped == null)
|
if (cropped == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var canvas = new Image<Bgra32>(m_Sprite.m_Rect.width, m_Sprite.m_Rect.height, SixLabors.ImageSharp.Color.Transparent);
|
var canvas = new Image<Bgra32>((int)MathF.Floor(m_Sprite.m_Rect.width), (int)MathF.Floor(m_Sprite.m_Rect.height));
|
||||||
canvas.Mutate(ctx => ctx.DrawImage(cropped, new Point(textureRectOffset.X, m_Sprite.m_Rect.height - textureRectOffset.Y - cropped.Height), 1f));
|
canvas.Mutate(ctx => ctx.DrawImage(cropped, new Point((int)MathF.Floor(textureRectOffset.X), (int)MathF.Floor(m_Sprite.m_Rect.height - textureRectOffset.Y - cropped.Height)), 1f));
|
||||||
|
|
||||||
cropped.Dispose();
|
cropped.Dispose();
|
||||||
return canvas;
|
return canvas;
|
||||||
|
|||||||
Reference in New Issue
Block a user