Improvements and bug fixes.

This commit is contained in:
Razmoth
2022-10-08 20:35:11 +04:00
parent e7fd546f28
commit e0014854ba
6 changed files with 40 additions and 34 deletions

View File

@@ -15,10 +15,10 @@ namespace AssetStudio
animationClip.m_ScaleCurves = converter.Scales.Union(animationClip.m_ScaleCurves).ToArray();
animationClip.m_FloatCurves = converter.Floats.Union(animationClip.m_FloatCurves).ToArray();
animationClip.m_PPtrCurves = converter.PPtrs.Union(animationClip.m_PPtrCurves).ToArray();
return ConvertSerializedAnimationClip(animationClip, game);
return ConvertSerializedAnimationClip(animationClip);
}
public static string ConvertSerializedAnimationClip(AnimationClip animationClip, Game game)
public static string ConvertSerializedAnimationClip(AnimationClip animationClip)
{
var sb = new StringBuilder();
using (var stringWriter = new StringWriter(sb))

View File

@@ -82,7 +82,7 @@ namespace AssetStudio
var polygons = triangles.Select(x => new Polygon(new LinearLineSegment(x.Select(y => new PointF(y.X, y.Y)).ToArray()))).ToArray();
IPathCollection path = new PathCollection(polygons);
var matrix = Matrix3x2.CreateScale(m_Sprite.m_PixelsToUnits);
matrix *= Matrix3x2.CreateTranslation(textureRect.width * m_Sprite.m_Pivot.X - textureRectOffset.X, textureRect.height * m_Sprite.m_Pivot.Y - textureRectOffset.Y);
matrix *= Matrix3x2.CreateTranslation(m_Sprite.m_Rect.width * m_Sprite.m_Pivot.X - textureRectOffset.X, m_Sprite.m_Rect.height * m_Sprite.m_Pivot.Y - textureRectOffset.Y);
path = path.Transform(matrix);
var graphicsOptions = new GraphicsOptions
{