Skip to content

Commit 793ff80

Browse files
Use the Correct Data Types for AsepriteNinePatchProperties and AsepritePivotProperties (#29)
* Use correct data type AsepritePivotProperties and AsepriteNinPatchProperties both incorrectly used `long` instead of `int` * Bump version number to 1.7.5
1 parent aac3f4a commit 793ff80

5 files changed

Lines changed: 486 additions & 473 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<NeutralLanguage>en</NeutralLanguage>
2121
<ImplicitUsings>enable</ImplicitUsings>
2222
<Nullable>enable</Nullable>
23-
<Version>1.7.4</Version>
23+
<Version>1.7.5</Version>
2424
</PropertyGroup>
2525

2626
<!-- Setup Code Analysis using the .editorconfig file -->
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
// Copyright (c) Christopher Whitley. All rights reserved.
2-
// Licensed under the MIT license.
3-
// See LICENSE file in the project root for full license information
4-
5-
using System.Runtime.InteropServices;
6-
7-
namespace AsepriteDotNet.Aseprite.Document;
8-
9-
[StructLayout(LayoutKind.Explicit)]
10-
internal struct AsepriteNinePatchProperties
11-
{
12-
internal const int StructSize = sizeof(long) + // X
13-
sizeof(long) + // Y
14-
sizeof(uint) + // Width
15-
sizeof(uint); // Height
16-
17-
[FieldOffset(0)]
18-
internal long X;
19-
20-
[FieldOffset(8)]
21-
internal long Y;
22-
23-
[FieldOffset(16)]
24-
internal uint Width;
25-
26-
[FieldOffset(20)]
27-
internal uint Height;
28-
}
1+
// Copyright (c) Christopher Whitley. All rights reserved.
2+
// Licensed under the MIT license.
3+
// See LICENSE file in the project root for full license information
4+
5+
using System.Runtime.InteropServices;
6+
7+
namespace AsepriteDotNet.Aseprite.Document;
8+
9+
[StructLayout(LayoutKind.Explicit)]
10+
internal struct AsepriteNinePatchProperties
11+
{
12+
internal const int StructSize = sizeof(int) + // X
13+
sizeof(int) + // Y
14+
sizeof(uint) + // Width
15+
sizeof(uint); // Height
16+
17+
[FieldOffset(0)]
18+
internal int X;
19+
20+
[FieldOffset(4)]
21+
internal int Y;
22+
23+
[FieldOffset(8)]
24+
internal uint Width;
25+
26+
[FieldOffset(12)]
27+
internal uint Height;
28+
}
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
// Copyright (c) Christopher Whitley. All rights reserved.
2-
// Licensed under the MIT license.
3-
// See LICENSE file in the project root for full license information
4-
5-
using System.Runtime.InteropServices;
6-
7-
namespace AsepriteDotNet.Aseprite.Document;
8-
9-
[StructLayout(LayoutKind.Explicit)]
10-
internal struct AsepritePivotProperties
11-
{
12-
internal const int StructSize = sizeof(long) + // X
13-
sizeof(long); // Y
14-
15-
[FieldOffset(0)]
16-
internal long X;
17-
18-
[FieldOffset(8)]
19-
internal long Y;
20-
}
1+
// Copyright (c) Christopher Whitley. All rights reserved.
2+
// Licensed under the MIT license.
3+
// See LICENSE file in the project root for full license information
4+
5+
using System.Runtime.InteropServices;
6+
7+
namespace AsepriteDotNet.Aseprite.Document;
8+
9+
[StructLayout(LayoutKind.Explicit)]
10+
internal struct AsepritePivotProperties
11+
{
12+
internal const int StructSize = sizeof(int) + // X
13+
sizeof(int); // Y
14+
15+
[FieldOffset(0)]
16+
internal int X;
17+
18+
[FieldOffset(4)]
19+
internal int Y;
20+
}
2 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)