Skip to content

Commit d9609c4

Browse files
committed
Add in a text measuring class and a test for it
1 parent 6c95940 commit d9609c4

File tree

67 files changed

+26948
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+26948
-9
lines changed
Binary file not shown.

.vs/AdobeScriptMaker.Core/v17/.suo

13.5 KB
Binary file not shown.
Binary file not shown.

MatrixLayout.Tests/MatrixLayout.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
@@ -11,6 +11,7 @@
1111
<PackageReference Include="NUnit" Version="3.13.2" />
1212
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
1313
<PackageReference Include="coverlet.collector" Version="3.1.0" />
14+
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
1415
</ItemGroup>
1516

1617
<ItemGroup>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using NUnit.Framework;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Text;
5+
6+
namespace MatrixLayout.Tests
7+
{
8+
public class TextMeasurerTests
9+
{
10+
[Test]
11+
public void RunsWithoutError()
12+
{
13+
var textMeasurer = new TextMeasurer();
14+
textMeasurer.MeasureText("Testing", new System.Drawing.Font("Arial", 12));
15+
}
16+
}
17+
}

MatrixLayout.Tests/bin/Debug/netcoreapp3.1/MatrixLayout.Tests.deps.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"Microsoft.NET.Test.Sdk": "16.11.0",
1313
"NUnit": "3.13.2",
1414
"NUnit3TestAdapter": "4.0.0",
15+
"System.Drawing.Common": "6.0.0",
1516
"coverlet.collector": "3.1.0"
1617
},
1718
"runtime": {
@@ -302,6 +303,22 @@
302303
}
303304
}
304305
},
306+
"Microsoft.Win32.SystemEvents/6.0.0": {
307+
"runtime": {
308+
"lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.dll": {
309+
"assemblyVersion": "6.0.0.0",
310+
"fileVersion": "6.0.21.52210"
311+
}
312+
},
313+
"runtimeTargets": {
314+
"runtimes/win/lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.dll": {
315+
"rid": "win",
316+
"assetType": "runtime",
317+
"assemblyVersion": "6.0.0.0",
318+
"fileVersion": "6.0.21.52210"
319+
}
320+
}
321+
},
305322
"NETStandard.Library/2.0.0": {
306323
"dependencies": {
307324
"Microsoft.NETCore.Platforms": "1.1.0"
@@ -380,6 +397,31 @@
380397
"System.Runtime": "4.1.0"
381398
}
382399
},
400+
"System.Drawing.Common/6.0.0": {
401+
"dependencies": {
402+
"Microsoft.Win32.SystemEvents": "6.0.0"
403+
},
404+
"runtime": {
405+
"lib/netcoreapp3.1/System.Drawing.Common.dll": {
406+
"assemblyVersion": "6.0.0.0",
407+
"fileVersion": "6.0.21.52210"
408+
}
409+
},
410+
"runtimeTargets": {
411+
"runtimes/unix/lib/netcoreapp3.1/System.Drawing.Common.dll": {
412+
"rid": "unix",
413+
"assetType": "runtime",
414+
"assemblyVersion": "6.0.0.0",
415+
"fileVersion": "6.0.21.52210"
416+
},
417+
"runtimes/win/lib/netcoreapp3.1/System.Drawing.Common.dll": {
418+
"rid": "win",
419+
"assetType": "runtime",
420+
"assemblyVersion": "6.0.0.0",
421+
"fileVersion": "6.0.21.52210"
422+
}
423+
}
424+
},
383425
"System.Dynamic.Runtime/4.0.11": {
384426
"dependencies": {
385427
"System.Collections": "4.0.11",
@@ -652,6 +694,9 @@
652694
}
653695
},
654696
"MatrixLayout/1.0.0": {
697+
"dependencies": {
698+
"System.Drawing.Common": "6.0.0"
699+
},
655700
"runtime": {
656701
"MatrixLayout.dll": {}
657702
}
@@ -720,6 +765,13 @@
720765
"path": "microsoft.testplatform.testhost/16.11.0",
721766
"hashPath": "microsoft.testplatform.testhost.16.11.0.nupkg.sha512"
722767
},
768+
"Microsoft.Win32.SystemEvents/6.0.0": {
769+
"type": "package",
770+
"serviceable": true,
771+
"sha512": "sha512-hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A==",
772+
"path": "microsoft.win32.systemevents/6.0.0",
773+
"hashPath": "microsoft.win32.systemevents.6.0.0.nupkg.sha512"
774+
},
723775
"NETStandard.Library/2.0.0": {
724776
"type": "package",
725777
"serviceable": true,
@@ -776,6 +828,13 @@
776828
"path": "system.diagnostics.tools/4.0.1",
777829
"hashPath": "system.diagnostics.tools.4.0.1.nupkg.sha512"
778830
},
831+
"System.Drawing.Common/6.0.0": {
832+
"type": "package",
833+
"serviceable": true,
834+
"sha512": "sha512-NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
835+
"path": "system.drawing.common/6.0.0",
836+
"hashPath": "system.drawing.common.6.0.0.nupkg.sha512"
837+
},
779838
"System.Dynamic.Runtime/4.0.11": {
780839
"type": "package",
781840
"serviceable": true,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3682225f8a55799e26c243f35dc3b597953e4ce8
1+
78e46d92237d88af2e3577640936e5a59727c908

MatrixLayout.Tests/obj/Debug/netcoreapp3.1/MatrixLayout.Tests.csproj.FileListAbsolute.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,8 @@ C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\obj\Debug\netcorea
9999
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\CoverletSourceRootsMapping
100100
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\MatrixLayout.dll
101101
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\MatrixLayout.pdb
102+
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\Microsoft.Win32.SystemEvents.dll
103+
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\System.Drawing.Common.dll
104+
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp3.1\Microsoft.Win32.SystemEvents.dll
105+
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\runtimes\unix\lib\netcoreapp3.1\System.Drawing.Common.dll
106+
C:\Users\scott\githubCode\AdobeScriptMaker\MatrixLayout.Tests\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp3.1\System.Drawing.Common.dll
Binary file not shown.
Binary file not shown.

MatrixLayout.Tests/obj/MatrixLayout.Tests.csproj.nuget.dgspec.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
"target": "Package",
5757
"version": "[4.0.0, )"
5858
},
59+
"System.Drawing.Common": {
60+
"target": "Package",
61+
"version": "[6.0.0, )"
62+
},
5963
"coverlet.collector": {
6064
"target": "Package",
6165
"version": "[3.1.0, )"
@@ -115,6 +119,12 @@
115119
"frameworks": {
116120
"netcoreapp3.1": {
117121
"targetAlias": "netcoreapp3.1",
122+
"dependencies": {
123+
"System.Drawing.Common": {
124+
"target": "Package",
125+
"version": "[6.0.0, )"
126+
}
127+
},
118128
"imports": [
119129
"net461",
120130
"net462",

MatrixLayout.Tests/obj/project.assets.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,24 @@
332332
"build/netcoreapp2.1/Microsoft.TestPlatform.TestHost.props": {}
333333
}
334334
},
335+
"Microsoft.Win32.SystemEvents/6.0.0": {
336+
"type": "package",
337+
"compile": {
338+
"lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.dll": {}
339+
},
340+
"runtime": {
341+
"lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.dll": {}
342+
},
343+
"build": {
344+
"buildTransitive/netcoreapp3.1/_._": {}
345+
},
346+
"runtimeTargets": {
347+
"runtimes/win/lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.dll": {
348+
"assetType": "runtime",
349+
"rid": "win"
350+
}
351+
}
352+
},
335353
"NETStandard.Library/2.0.0": {
336354
"type": "package",
337355
"dependencies": {
@@ -443,6 +461,31 @@
443461
"ref/netstandard1.0/_._": {}
444462
}
445463
},
464+
"System.Drawing.Common/6.0.0": {
465+
"type": "package",
466+
"dependencies": {
467+
"Microsoft.Win32.SystemEvents": "6.0.0"
468+
},
469+
"compile": {
470+
"lib/netcoreapp3.1/System.Drawing.Common.dll": {}
471+
},
472+
"runtime": {
473+
"lib/netcoreapp3.1/System.Drawing.Common.dll": {}
474+
},
475+
"build": {
476+
"buildTransitive/netcoreapp3.1/_._": {}
477+
},
478+
"runtimeTargets": {
479+
"runtimes/unix/lib/netcoreapp3.1/System.Drawing.Common.dll": {
480+
"assetType": "runtime",
481+
"rid": "unix"
482+
},
483+
"runtimes/win/lib/netcoreapp3.1/System.Drawing.Common.dll": {
484+
"assetType": "runtime",
485+
"rid": "win"
486+
}
487+
}
488+
},
446489
"System.Dynamic.Runtime/4.0.11": {
447490
"type": "package",
448491
"dependencies": {
@@ -886,6 +929,9 @@
886929
"MatrixLayout/1.0.0": {
887930
"type": "project",
888931
"framework": ".NETCoreApp,Version=v3.1",
932+
"dependencies": {
933+
"System.Drawing.Common": "6.0.0"
934+
},
889935
"compile": {
890936
"bin/placeholder/MatrixLayout.dll": {}
891937
},
@@ -1602,6 +1648,35 @@
16021648
"microsoft.testplatform.testhost.nuspec"
16031649
]
16041650
},
1651+
"Microsoft.Win32.SystemEvents/6.0.0": {
1652+
"sha512": "hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A==",
1653+
"type": "package",
1654+
"path": "microsoft.win32.systemevents/6.0.0",
1655+
"files": [
1656+
".nupkg.metadata",
1657+
".signature.p7s",
1658+
"Icon.png",
1659+
"LICENSE.TXT",
1660+
"THIRD-PARTY-NOTICES.TXT",
1661+
"buildTransitive/netcoreapp2.0/Microsoft.Win32.SystemEvents.targets",
1662+
"buildTransitive/netcoreapp3.1/_._",
1663+
"lib/net461/Microsoft.Win32.SystemEvents.dll",
1664+
"lib/net461/Microsoft.Win32.SystemEvents.xml",
1665+
"lib/net6.0/Microsoft.Win32.SystemEvents.dll",
1666+
"lib/net6.0/Microsoft.Win32.SystemEvents.xml",
1667+
"lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.dll",
1668+
"lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.xml",
1669+
"lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll",
1670+
"lib/netstandard2.0/Microsoft.Win32.SystemEvents.xml",
1671+
"microsoft.win32.systemevents.6.0.0.nupkg.sha512",
1672+
"microsoft.win32.systemevents.nuspec",
1673+
"runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll",
1674+
"runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.xml",
1675+
"runtimes/win/lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.dll",
1676+
"runtimes/win/lib/netcoreapp3.1/Microsoft.Win32.SystemEvents.xml",
1677+
"useSharedDesignerContext.txt"
1678+
]
1679+
},
16051680
"NETStandard.Library/2.0.0": {
16061681
"sha512": "7jnbRU+L08FXKMxqUflxEXtVymWvNOrS8yHgu9s6EM8Anr6T/wIX4nZ08j/u3Asz+tCufp3YVwFSEvFTPYmBPA==",
16071682
"type": "package",
@@ -2018,6 +2093,45 @@
20182093
"system.diagnostics.tools.nuspec"
20192094
]
20202095
},
2096+
"System.Drawing.Common/6.0.0": {
2097+
"sha512": "NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
2098+
"type": "package",
2099+
"path": "system.drawing.common/6.0.0",
2100+
"files": [
2101+
".nupkg.metadata",
2102+
".signature.p7s",
2103+
"Icon.png",
2104+
"LICENSE.TXT",
2105+
"THIRD-PARTY-NOTICES.TXT",
2106+
"buildTransitive/netcoreapp2.0/System.Drawing.Common.targets",
2107+
"buildTransitive/netcoreapp3.1/_._",
2108+
"lib/MonoAndroid10/_._",
2109+
"lib/MonoTouch10/_._",
2110+
"lib/net461/System.Drawing.Common.dll",
2111+
"lib/net461/System.Drawing.Common.xml",
2112+
"lib/net6.0/System.Drawing.Common.dll",
2113+
"lib/net6.0/System.Drawing.Common.xml",
2114+
"lib/netcoreapp3.1/System.Drawing.Common.dll",
2115+
"lib/netcoreapp3.1/System.Drawing.Common.xml",
2116+
"lib/netstandard2.0/System.Drawing.Common.dll",
2117+
"lib/netstandard2.0/System.Drawing.Common.xml",
2118+
"lib/xamarinios10/_._",
2119+
"lib/xamarinmac20/_._",
2120+
"lib/xamarintvos10/_._",
2121+
"lib/xamarinwatchos10/_._",
2122+
"runtimes/unix/lib/net6.0/System.Drawing.Common.dll",
2123+
"runtimes/unix/lib/net6.0/System.Drawing.Common.xml",
2124+
"runtimes/unix/lib/netcoreapp3.1/System.Drawing.Common.dll",
2125+
"runtimes/unix/lib/netcoreapp3.1/System.Drawing.Common.xml",
2126+
"runtimes/win/lib/net6.0/System.Drawing.Common.dll",
2127+
"runtimes/win/lib/net6.0/System.Drawing.Common.xml",
2128+
"runtimes/win/lib/netcoreapp3.1/System.Drawing.Common.dll",
2129+
"runtimes/win/lib/netcoreapp3.1/System.Drawing.Common.xml",
2130+
"system.drawing.common.6.0.0.nupkg.sha512",
2131+
"system.drawing.common.nuspec",
2132+
"useSharedDesignerContext.txt"
2133+
]
2134+
},
20212135
"System.Dynamic.Runtime/4.0.11": {
20222136
"sha512": "db34f6LHYM0U0JpE+sOmjar27BnqTVkbLJhgfwMpTdgTigG/Hna3m2MYVwnFzGGKnEJk2UXFuoVTr8WUbU91/A==",
20232137
"type": "package",
@@ -3867,6 +3981,7 @@
38673981
"Microsoft.NET.Test.Sdk >= 16.11.0",
38683982
"NUnit >= 3.13.2",
38693983
"NUnit3TestAdapter >= 4.0.0",
3984+
"System.Drawing.Common >= 6.0.0",
38703985
"coverlet.collector >= 3.1.0"
38713986
]
38723987
},
@@ -3925,6 +4040,10 @@
39254040
"target": "Package",
39264041
"version": "[4.0.0, )"
39274042
},
4043+
"System.Drawing.Common": {
4044+
"target": "Package",
4045+
"version": "[6.0.0, )"
4046+
},
39284047
"coverlet.collector": {
39294048
"target": "Package",
39304049
"version": "[3.1.0, )"

MatrixLayout.Tests/obj/project.nuget.cache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": 2,
3-
"dgSpecHash": "n6rWXED3GnhWoBMj2UitNAxPgzrV9THcfRm0nGv8slmSZ+B0l6SofPtxhPhCuH2LHm0d1OvamjXVyXbfTvwJIw==",
3+
"dgSpecHash": "JIjvm8pSBE4MUzOKkpc3cXoutcdp6aUcYHw3p3ewzRXdyLIycCrb04ijHusRsrW2JHQp9RT+y6Jxl6J4ta/2gA==",
44
"success": true,
55
"projectFilePath": "C:\\Users\\scott\\githubCode\\AdobeScriptMaker\\MatrixLayout.Tests\\MatrixLayout.Tests.csproj",
66
"expectedPackageFiles": [
@@ -12,6 +12,7 @@
1212
"C:\\Users\\scott\\.nuget\\packages\\microsoft.netcore.targets\\1.0.1\\microsoft.netcore.targets.1.0.1.nupkg.sha512",
1313
"C:\\Users\\scott\\.nuget\\packages\\microsoft.testplatform.objectmodel\\16.11.0\\microsoft.testplatform.objectmodel.16.11.0.nupkg.sha512",
1414
"C:\\Users\\scott\\.nuget\\packages\\microsoft.testplatform.testhost\\16.11.0\\microsoft.testplatform.testhost.16.11.0.nupkg.sha512",
15+
"C:\\Users\\scott\\.nuget\\packages\\microsoft.win32.systemevents\\6.0.0\\microsoft.win32.systemevents.6.0.0.nupkg.sha512",
1516
"C:\\Users\\scott\\.nuget\\packages\\netstandard.library\\2.0.0\\netstandard.library.2.0.0.nupkg.sha512",
1617
"C:\\Users\\scott\\.nuget\\packages\\newtonsoft.json\\9.0.1\\newtonsoft.json.9.0.1.nupkg.sha512",
1718
"C:\\Users\\scott\\.nuget\\packages\\nuget.frameworks\\5.0.0\\nuget.frameworks.5.0.0.nupkg.sha512",
@@ -20,6 +21,7 @@
2021
"C:\\Users\\scott\\.nuget\\packages\\system.collections\\4.0.11\\system.collections.4.0.11.nupkg.sha512",
2122
"C:\\Users\\scott\\.nuget\\packages\\system.diagnostics.debug\\4.0.11\\system.diagnostics.debug.4.0.11.nupkg.sha512",
2223
"C:\\Users\\scott\\.nuget\\packages\\system.diagnostics.tools\\4.0.1\\system.diagnostics.tools.4.0.1.nupkg.sha512",
24+
"C:\\Users\\scott\\.nuget\\packages\\system.drawing.common\\6.0.0\\system.drawing.common.6.0.0.nupkg.sha512",
2325
"C:\\Users\\scott\\.nuget\\packages\\system.dynamic.runtime\\4.0.11\\system.dynamic.runtime.4.0.11.nupkg.sha512",
2426
"C:\\Users\\scott\\.nuget\\packages\\system.globalization\\4.0.11\\system.globalization.4.0.11.nupkg.sha512",
2527
"C:\\Users\\scott\\.nuget\\packages\\system.io\\4.1.0\\system.io.4.1.0.nupkg.sha512",

MatrixLayout/MatrixLayout.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
</PropertyGroup>
66

7+
<ItemGroup>
8+
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
9+
</ItemGroup>
10+
711
</Project>

0 commit comments

Comments
 (0)