Skip to content

Commit

Permalink
Add back the SkiaSharp libs and Samples
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Jul 11, 2022
1 parent 91ea9d5 commit 86ed75e
Show file tree
Hide file tree
Showing 38 changed files with 964 additions and 270 deletions.
26 changes: 26 additions & 0 deletions Microsoft.Maui.Graphics.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"solution": {
"path": "Microsoft.Maui.sln",
"projects": [
"src\\Graphics\\samples\\GraphicsTester.Android\\GraphicsTester.Android.csproj",
"src\\Graphics\\samples\\GraphicsTester.MacCatalyst\\GraphicsTester.MacCatalyst.csproj",
"src\\Graphics\\samples\\GraphicsTester.Mac\\GraphicsTester.Mac.csproj",
"src\\Graphics\\samples\\GraphicsTester.Portable\\GraphicsTester.Portable.csproj",
"src\\Graphics\\samples\\GraphicsTester.Skia.Console\\GraphicsTester.Skia.Console.csproj",
"src\\Graphics\\samples\\GraphicsTester.Skia.Gtk\\GraphicsTester.Skia.Gtk.csproj",
"src\\Graphics\\samples\\GraphicsTester.Skia.Mac\\GraphicsTester.Skia.Mac.csproj",
"src\\Graphics\\samples\\GraphicsTester.Skia.Tizen\\GraphicsTester.Skia.Tizen.csproj",
"src\\Graphics\\samples\\GraphicsTester.Skia.Windows\\GraphicsTester.Skia.Windows.csproj",
"src\\Graphics\\samples\\GraphicsTester.WinUI.Desktop\\GraphicsTester.WinUI.Desktop.csproj",
"src\\Graphics\\samples\\GraphicsTester.iOS\\GraphicsTester.iOS.csproj",
"src\\Graphics\\src\\Graphics.Skia.GtkSharp\\Graphics.Skia.GtkSharp.csproj",
"src\\Graphics\\src\\Graphics.Skia.WPF\\Graphics.Skia.WPF.csproj",
"src\\Graphics\\src\\Graphics.Skia\\Graphics.Skia.csproj",
"src\\Graphics\\src\\Graphics.Win2D\\Graphics.Win2D.csproj",
"src\\Graphics\\src\\Graphics\\Graphics.csproj",
"src\\Graphics\\src\\Text.Markdig\\Graphics.Text.Markdig.csproj",
"src\\Graphics\\tests\\Graphics.Benchmarks\\Graphics.Benchmarks.csproj",
"src\\Graphics\\tests\\Graphics.Tests\\Graphics.Tests.csproj"
]
}
}
23 changes: 23 additions & 0 deletions Microsoft.Maui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsTester.Skia.Windows
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsTester.WinUI.Desktop", "src\Graphics\samples\GraphicsTester.WinUI.Desktop\GraphicsTester.WinUI.Desktop.csproj", "{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Graphics.Skia.GtkSharp", "src\Graphics\src\Graphics.Skia.GtkSharp\Graphics.Skia.GtkSharp.csproj", "{AFD9D653-08C4-456C-AA1B-F5C9F621D655}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Graphics.Skia.WPF", "src\Graphics\src\Graphics.Skia.WPF\Graphics.Skia.WPF.csproj", "{F26D31D3-CE4C-4F32-A77F-E2905C948674}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsTester.Skia.Gtk", "src\Graphics\samples\GraphicsTester.Skia.Gtk\GraphicsTester.Skia.Gtk.csproj", "{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -602,8 +608,22 @@ Global
{8441FA70-9041-4727-91B9-2F39881CC0EE}.Release|Any CPU.Build.0 = Release|Any CPU
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Release|Any CPU.Build.0 = Release|Any CPU
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Release|Any CPU.Deploy.0 = Release|Any CPU
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Release|Any CPU.Build.0 = Release|Any CPU
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Release|Any CPU.Build.0 = Release|Any CPU
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -717,6 +737,9 @@ Global
{20756558-1284-42D6-AB7B-3E59DF8A6B34} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
{8441FA70-9041-4727-91B9-2F39881CC0EE} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
{AFD9D653-08C4-456C-AA1B-F5C9F621D655} = {42AB9AE1-631D-4AD4-85B7-910FF0940BDB}
{F26D31D3-CE4C-4F32-A77F-E2905C948674} = {42AB9AE1-631D-4AD4-85B7-910FF0940BDB}
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B8ABEAD-D2B5-4370-A187-62B5ABE4EE50}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-android</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>GraphicsTester.Android</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
<ApplicationId>com.microsoft.maui.graphicstester</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0-android</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>GraphicsTester.Android</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
<ApplicationId>com.microsoft.maui.graphicstester</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>

</Project>
39 changes: 17 additions & 22 deletions src/Graphics/samples/GraphicsTester.Mac/GraphicsTester.Mac.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-macos</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>GraphicsTester.Mac</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-macos'">10.14</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0-macos</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>GraphicsTester.Mac</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
<IsPackable>false</IsPackable>
<EnableCodeSigning>false</EnableCodeSigning>
<UseSGen>false</UseSGen>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<EnableCodeSigning>false</EnableCodeSigning>
<UseSGen>false</UseSGen>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<EnableCodeSigning>false</EnableCodeSigning>
<UseSGen>false</UseSGen>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions src/Graphics/samples/GraphicsTester.Mac/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ namespace GraphicsTester.Mac
{
public partial class MainWindow : AppKit.NSWindow
{
private TesterView testerView;

// Called when created from unmanaged code
public MainWindow (IntPtr handle) : base (handle)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-maccatalyst</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>GraphicsTester.MacCatalyst</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.2</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0-maccatalyst</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>GraphicsTester.MacCatalyst</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>10.0</LangVersion>
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Graphics/samples/GraphicsTester.MacCatalyst/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public override UITableViewCell GetCell(UITableView tableView, NSIndexPath index
cell = new UITableViewCell(UITableViewCellStyle.Default, "cell");
}

#pragma warning disable CA1416 // Validate platform compatibility
cell.TextLabel.Text = ScenarioList.Scenarios[indexPath.Row].ToString();
#pragma warning restore CA1416 // Validate platform compatibility

return cell;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<AssemblyName>GraphicsTester.Portable</AssemblyName>
<RootNamespace>GraphicsTester</RootNamespace>
<Version>2.0.0</Version>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<AssemblyName>GraphicsTester.Portable</AssemblyName>
<RootNamespace>GraphicsTester</RootNamespace>
<Version>2.0.0</Version>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
<None Remove="Properties\**" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\royals.png" />
<EmbeddedResource Include="Resources\swirl_pattern.png" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Markdig" Version="0.22.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
<None Remove="Properties\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\royals.png" />
<None Remove="Resources\swirl_pattern.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\royals.png" />
<EmbeddedResource Include="Resources\swirl_pattern.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Markdig" Version="0.22.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>GraphicsTester.ConsoleApp</RootNamespace>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>GraphicsTester.ConsoleApp</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.88.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.88.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Graphics/samples/GraphicsTester.Skia.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ static string GetSafeFilename(string text)
}

string safe = new string(chars);
while (safe.Contains("--"))
safe = safe.Replace("--", "-");
while (safe.Contains("--", StringComparison.OrdinalIgnoreCase))
safe = safe.Replace("--", "-", StringComparison.OrdinalIgnoreCase);
return safe.Trim('-');
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>GraphicsTester.Skia.Gtk</RootNamespace>
<PackageId>GraphicsTester.Skia.Gtk</PackageId>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Graphics.Skia.GtkSharp\Graphics.Skia.GtkSharp.csproj" />
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0" />
<PackageReference Include="SkiaSharp.Views.Gtk3" Version="2.88.0" />
<PackageReference Include="GtkSharp" Version="3.24.24.34" />
</ItemGroup>

</Project>
Loading

0 comments on commit 86ed75e

Please sign in to comment.