This commit is contained in:
Matthew Leibowitz 2017-09-27 03:10:32 +02:00
Родитель d02cd89a68 45639eae6e
Коммит 5c4f019673
73 изменённых файлов: 418 добавлений и 398 удалений

Просмотреть файл

@ -11,6 +11,7 @@ using System.Runtime.InteropServices;
using System.IO;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
#if __IOS__
using ObjCRuntime;
@ -144,10 +145,13 @@ namespace SkiaSharp
{
var managedStream = AsManagedStream (managedStreamPtr);
var count = (int)size;
var managedBuffer = new byte[count];
var result = managedStream.stream.Read (managedBuffer, 0, count);
byte[] managedBuffer;
using (var reader = new BinaryReader (managedStream.stream, Encoding.UTF8, true)) {
managedBuffer = reader.ReadBytes (count);
}
var result = managedBuffer.Length;
if (buffer != IntPtr.Zero) {
Marshal.Copy (managedBuffer, 0, buffer, count);
Marshal.Copy (managedBuffer, 0, buffer, result);
}
return (IntPtr)result;
}
@ -162,10 +166,13 @@ namespace SkiaSharp
}
var oldPos = managedStream.stream.Position;
var count = (int)size;
var managedBuffer = new byte[count];
var result = managedStream.stream.Read (managedBuffer, 0, count);
byte[] managedBuffer;
using (var reader = new BinaryReader (managedStream.stream, Encoding.UTF8, true)) {
managedBuffer = reader.ReadBytes (count);
}
var result = managedBuffer.Length;
if (buffer != IntPtr.Zero) {
Marshal.Copy (managedBuffer, 0, buffer, count);
Marshal.Copy (managedBuffer, 0, buffer, result);
}
managedStream.stream.Position = oldPos;
return (IntPtr)result;

Просмотреть файл

@ -78,7 +78,7 @@ namespace SkiaSharp
#elif __MACOS__
private const string SKIA = "libSkiaSharp.dylib";
#elif DESKTOP
private const string SKIA = "libSkiaSharp.dll"; // redirected using .dll.config to 'libSkiaSharp.dylib' on OS X
private const string SKIA = "libSkiaSharp";
#elif WINDOWS_UWP
private const string SKIA = "libSkiaSharp.dll";
#elif NET_STANDARD

Просмотреть файл

@ -49,9 +49,6 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" Condition="Exists('..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems')" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" Condition="Exists('..\Binding.Shared\Binding.Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<ItemGroup>
<EmbeddedNativeLibrary Include="..\..\native-builds\lib\android\arm64-v8a\libHarfBuzzSharp.so">
<Link>libs\arm64-v8a\libHarfBuzzSharp.so</Link>
@ -66,4 +63,7 @@
<Link>libs\x86_64\libHarfBuzzSharp.so</Link>
</EmbeddedNativeLibrary>
</ItemGroup>
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<dllmap dll="libHarfBuzzSharp.dll" target="libHarfBuzzSharp.dylib" os="osx" />
<dllmap dll="libHarfBuzzSharp.dll" target="libHarfBuzzSharp.so" os="!windows,osx" />
<!-- <dllmap dll="libHarfBuzzSharp.dll" target="libHarfBuzzSharp.dylib" os="osx" /> -->
<!-- <dllmap dll="libHarfBuzzSharp.dll" target="libHarfBuzzSharp.so" os="!windows,osx" /> -->
</configuration>

Просмотреть файл

@ -13,6 +13,7 @@
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\mono.snk</AssemblyOriginatorKeyFile>
<MSBuildWarningsAsMessages>MSB9004</MSBuildWarningsAsMessages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -71,7 +72,7 @@
<ItemGroup>
<ObjcBindingCoreSource Include="Structs.cs" />
</ItemGroup>
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" Condition="Exists('..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems')" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" Condition="Exists('..\Binding.Shared\Binding.Shared.projitems')" />
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.ObjcBinding.CSharp.targets" />
</Project>

Просмотреть файл

@ -28,7 +28,7 @@ namespace HarfBuzzSharp
#elif __MACOS__
private const string HARFBUZZ = "libHarfBuzzSharp.dylib";
#elif DESKTOP
private const string HARFBUZZ = "libHarfBuzzSharp.dll"; // redirected using .dll.config to 'libHarfBuzzSharp.dylib' on OS X
private const string HARFBUZZ = "libHarfBuzzSharp";
#elif WINDOWS_UWP
private const string HARFBUZZ = "libHarfBuzzSharp.dll";
#elif NET_STANDARD

Просмотреть файл

@ -39,8 +39,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
@ -52,11 +51,4 @@
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,16 +0,0 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

Просмотреть файл

@ -11,6 +11,7 @@
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\mono.snk</AssemblyOriginatorKeyFile>
<MSBuildWarningsAsMessages>MSB9004</MSBuildWarningsAsMessages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -46,7 +47,7 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" Condition="Exists('..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems')" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" Condition="Exists('..\Binding.Shared\Binding.Shared.projitems')" />
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
</Project>

Просмотреть файл

@ -11,6 +11,7 @@
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\mono.snk</AssemblyOriginatorKeyFile>
<MSBuildWarningsAsMessages>MSB9004</MSBuildWarningsAsMessages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -48,7 +49,7 @@
<Link>libHarfBuzzSharp.a</Link>
</ObjcBindingNativeLibrary>
</ItemGroup>
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" Condition="Exists('..\Binding.Shared\Binding.Shared.projitems')" />
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" Condition="Exists('..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems')" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="..\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\TVOS\Xamarin.TVOS.ObjCBinding.CSharp.targets" />
</Project>

Просмотреть файл

@ -48,7 +48,7 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="..\Binding\Binding.projitems" Label="Shared" Condition="Exists('..\Binding\Binding.projitems')" />
<Import Project="..\Binding\Binding.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<ItemGroup />

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<dllmap dll="libSkiaSharp.dll" target="libSkiaSharp.dylib" os="osx" />
<dllmap dll="libSkiaSharp.dll" target="libSkiaSharp.so" os="!windows,osx" />
<!-- <dllmap dll="libSkiaSharp.dll" target="libSkiaSharp.dylib" os="osx" /> -->
<!-- <dllmap dll="libSkiaSharp.dll" target="libSkiaSharp.so" os="!windows,osx" /> -->
</configuration>

Просмотреть файл

@ -13,6 +13,7 @@
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\mono.snk</AssemblyOriginatorKeyFile>
<MSBuildWarningsAsMessages>MSB9004</MSBuildWarningsAsMessages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -56,7 +57,7 @@
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<Import Project="..\Binding\Binding.projitems" Label="Shared" Condition="Exists('..\Binding\Binding.projitems')" />
<Import Project="..\Binding\Binding.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.ObjcBinding.CSharp.targets" />
<ItemGroup>

Просмотреть файл

@ -11,7 +11,7 @@
<AssemblyName>SkiaSharp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
@ -41,8 +41,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
@ -54,11 +53,4 @@
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,16 +0,0 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

Просмотреть файл

@ -11,6 +11,7 @@
<AssemblyName>SkiaSharp</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\mono.snk</AssemblyOriginatorKeyFile>
<MSBuildWarningsAsMessages>MSB9004</MSBuildWarningsAsMessages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -54,7 +55,7 @@
<Kind>Framework</Kind>
</NativeReference>
</ItemGroup>
<Import Project="..\Binding\Binding.projitems" Label="Shared" Condition="Exists('..\Binding\Binding.projitems')" />
<Import Project="..\Binding\Binding.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
</Project>

Просмотреть файл

@ -11,6 +11,7 @@
<AssemblyName>SkiaSharp</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\mono.snk</AssemblyOriginatorKeyFile>
<MSBuildWarningsAsMessages>MSB9004</MSBuildWarningsAsMessages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -54,7 +55,7 @@
<Kind>Framework</Kind>
</NativeReference>
</ItemGroup>
<Import Project="..\Binding\Binding.projitems" Label="Shared" Condition="Exists('..\Binding\Binding.projitems')" />
<Import Project="..\Binding\Binding.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\TVOS\Xamarin.TVOS.ObjCBinding.CSharp.targets" />
</Project>

Просмотреть файл

@ -1,6 +1,7 @@
#addin "Cake.Xamarin"
#addin "Cake.XCode"
#addin "Cake.FileHelpers"
#addin nuget:?package=Cake.Xamarin&version=1.3.0.15
#addin nuget:?package=Cake.XCode&version=2.0.13
#addin nuget:?package=Cake.FileHelpers&version=1.0.4
#reference "tools/SharpCompress/lib/net45/SharpCompress.dll"
using System.Linq;
@ -243,7 +244,7 @@ Task ("tests")
// .NET Core
EnsureDirectoryExists ("./output/tests/netcore");
RunDotNetCoreRestore ("./tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.sln");
RunNuGetRestore ("./tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.sln");
DotNetCorePublish ("./tests/SkiaSharp.NetCore.Tests.Runner", new DotNetCorePublishSettings {
Configuration = "Release",
OutputDirectory = "./tests/SkiaSharp.NetCore.Tests.Runner/artifacts/"

Просмотреть файл

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="0.20.0" />
<package id="NUnit.ConsoleRunner" version="3.6.1" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.5.0" />
<package id="Cake" version="0.21.1" />
<package id="NUnit.ConsoleRunner" version="3.7.0" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" />
<package id="Microsoft.DotNet.BuildTools.GenAPI" version="1.0.0-beta-00081" />
<package id="SharpCompress" version="0.15.2" />
<package id="SharpCompress" version="0.18.1" />
<package id="XamarinComponent" version="1.1.0.60" />
</packages>

Просмотреть файл

@ -2,21 +2,17 @@ using System.Runtime.InteropServices;
using SharpCompress.Readers;
var VERBOSITY_NUGET = NuGetVerbosity.Detailed;
var VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Verbose;
switch (VERBOSITY) {
case Verbosity.Quiet:
case Verbosity.Minimal:
VERBOSITY_NUGET = NuGetVerbosity.Quiet;
VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Minimal;
break;
case Verbosity.Normal:
VERBOSITY_NUGET = NuGetVerbosity.Normal;
VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Warning;
break;
case Verbosity.Verbose:
case Verbosity.Diagnostic:
VERBOSITY_NUGET = NuGetVerbosity.Detailed;
VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Verbose;
break;
};
@ -29,14 +25,6 @@ var RunNuGetRestore = new Action<FilePath> ((solution) =>
});
});
var RunDotNetCoreRestore = new Action<string> ((solution) =>
{
DotNetCoreRestore (solution, new DotNetCoreRestoreSettings {
Sources = NuGetSources,
// Verbosity = VERBOSITY_NUGETCORE // TODO: v1.1.1 has different values ???
});
});
var RunMSBuildWithPlatform = new Action<FilePath, string> ((solution, platform) =>
{
MSBuild (solution, c => {

Просмотреть файл

@ -185,12 +185,10 @@
</Parameters>
<Docs>
<param name="format">The file format used to encode the image.</param>
<param name="quality">The quality level to use for the image.</param>
<param name="quality">The quality level to use for the image. This is in the range from 0-100.</param>
<summary>Encodes the image using the specified format.</summary>
<returns>Returns the <see cref="T:SkiaSharp.SKData" /> wrapping the encoded image.</returns>
<remarks>
<para></para>
</remarks>
<remarks>The quality is a suggestion, and not all formats (eg: png) respect or support it.</remarks>
</Docs>
</Member>
<Member MemberName="Encode">

2
externals/api-doc-tools поставляемый

@ -1 +1 @@
Subproject commit 495692876090ed829275254bf16b31e47950a43d
Subproject commit f51d2af552e63de7d72555a5c61d9c2a28b7faa0

2
externals/depot_tools поставляемый

@ -1 +1 @@
Subproject commit a3b67ae2a7a9a94299255e14600cd1127ad39b20
Subproject commit ced744fa465542223771a7383edadba107e6c041

Просмотреть файл

@ -167,35 +167,35 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

Просмотреть файл

@ -41,39 +41,39 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

Просмотреть файл

@ -12,6 +12,7 @@
<licenseUrl>https://github.com/mono/SkiaSharp/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp</tags>
</metadata>
<files>
<!-- the platform specific -->

Просмотреть файл

@ -12,6 +12,7 @@
<licenseUrl>https://github.com/mono/SkiaSharp/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp</tags>
</metadata>
<files>
<!-- the platform specific -->

Просмотреть файл

@ -12,6 +12,7 @@
<licenseUrl>https://github.com/mono/SkiaSharp/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp</tags>
</metadata>
<files>
<!-- the platform specific -->

Просмотреть файл

@ -12,6 +12,7 @@
<licenseUrl>https://github.com/mono/SkiaSharp/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp</tags>
</metadata>
<files>
<!-- the platform specific -->

Двоичный файл не отображается.

Просмотреть файл

@ -53,11 +53,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.60.0" />
<PackageReference Include="Xamarin.Forms" Version="2.4.0.269-pre2" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.59.1" />
<PackageReference Include="Xamarin.Forms" Version="2.3.4.231" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj">
@ -75,13 +77,11 @@
<AndroidAsset Include="..\..\SkiaSharpSample.Shared\Media\content-font.ttf">
<Link>Assets\Media\content-font.ttf</Link>
</AndroidAsset>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProguardConfiguration Include="proguard.cfg" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\ic_launcher.png" />
@ -96,8 +96,6 @@
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\drawable\splash.xml" />
<AndroidResource Include="Resources\drawable\skia.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\configure.png" />
<AndroidResource Include="Resources\drawable\slideshow.png" />
<AndroidResource Include="Resources\drawable-hdpi\configure.png" />

Просмотреть файл

@ -1,23 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E01FBABA-8DA1-432B-9253-F4ABE13A3A6A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SkiaSharpSample.FormsSample</RootNamespace>
<PackageTargetFallback>portable-net45+win8+wpa81+wp8</PackageTargetFallback>
<AssemblyName>SkiaSharpSample.FormsSample</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.60.0" />
<PackageReference Include="Xamarin.Forms" Version="2.4.0.269-pre2" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.59.1" />
<PackageReference Include="Xamarin.Forms" Version="2.3.4.231" />
</ItemGroup>
<ItemGroup>
<None Remove="**\*.xaml" />
<Compile Update="**\*.xaml.cs" DependentUpon="%(Filename)" />
<EmbeddedResource Include="**\*.xaml" SubType="Designer" Generator="MSBuild:UpdateDesignTimeXaml" />
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="DetailContentsPage.xaml.cs">
<DependentUpon>DetailContentsPage.xaml</DependentUpon>
</Compile>
<Compile Include="DetailsPage.xaml.cs">
<DependentUpon>DetailsPage.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="MasterPage.xaml.cs">
<DependentUpon>MasterPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Include="App.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DetailContentsPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MasterPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DetailsPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
</Project>

Просмотреть файл

@ -28,6 +28,9 @@
<UseSGen>true</UseSGen>
<UseRefCounting>true</UseRefCounting>
<Profiling>true</Profiling>
<HttpClientHandler></HttpClientHandler>
<LinkMode></LinkMode>
<XamMacArch></XamMacArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType></DebugType>
@ -43,6 +46,8 @@
<UseSGen>true</UseSGen>
<UseRefCounting>true</UseRefCounting>
<LinkMode>SdkOnly</LinkMode>
<HttpClientHandler></HttpClientHandler>
<XamMacArch></XamMacArch>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@ -51,11 +56,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.60.0" />
<PackageReference Include="Xamarin.Forms" Version="2.4.0.269-pre2" />
<PackageReference Include="SkiaSharp.Extended" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.59.1" />
<PackageReference Include="Xamarin.Forms" Version="2.3.5.235-pre2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj">
@ -63,6 +70,10 @@
<Name>Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
<ImageAsset Include="Assets.xcassets\Contents.json" />
@ -77,17 +88,10 @@
<ItemGroup>
<None Include="Info.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\configure.png" />
<BundleResource Include="Resources\configure%402x.png" />
<BundleResource Include="Resources\configure%403x.png" />
<BundleResource Include="..\..\SkiaSharpSample.Shared\Media\content-font.ttf">
<Link>Resources\content-font.ttf</Link>
</BundleResource>
<BundleResource Include="Resources\hamburger.png" />
<BundleResource Include="Resources\hamburger%402x.png" />
<BundleResource Include="Resources\hamburger%403x.png" />
@ -95,6 +99,9 @@
<BundleResource Include="Resources\slideshow.png" />
<BundleResource Include="Resources\slideshow%402x.png" />
<BundleResource Include="Resources\slideshow%403x.png" />
<BundleResource Include="..\..\SkiaSharpSample.Shared\Media\content-font.ttf">
<Link>Resources\content-font.ttf</Link>
</BundleResource>
</ItemGroup>
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="51681.NETDevelopmentAddic.Skia.UWP.Demo" Publisher="CN=B0BB84CF-0033-49C8-BB54-7D95062245A2" Version="1.55.1.0" />
<mp:PhoneIdentity PhoneProductId="ba3af39c-4820-4731-a149-e78facd8bdff" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Identity Name="51681.NETDevelopmentAddic.Skia.UWP.Demo" Publisher="CN=B0BB84CF-0033-49C8-BB54-7D95062245A2" Version="1.59.2.0" />
<mp:PhoneIdentity PhoneProductId="dd526c48-8071-4f73-b3b6-3a5fb140a870" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>SkiaSharp for Xamarin.Forms</DisplayName>
<PublisherDisplayName>.NET Development Addict</PublisherDisplayName>

Просмотреть файл

@ -11,14 +11,14 @@
<AssemblyName>SkiaSharpSample.FormsSample.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>..\..\AppStoreCertificates\Skia.UWP.Demo_StoreKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>77BB456C567B1501535FACDA67D559B9513862C1</PackageCertificateThumbprint>
<PackageCertificateKeyFile>..\..\AppStoreCertificates\Skia.UWP.Demo_StoreKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>A9102DF7FB3501F23B65D59B624A9CB05C065366</PackageCertificateThumbprint>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
@ -93,8 +93,24 @@
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj">
<Project>{e3d24d5e-80b0-45e1-ad55-d69d00bfa5f8}</Project>
<Name>Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<SDKReference Include="WindowsMobile, Version=10.0.10240.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
@ -137,17 +153,6 @@
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj">
<Project>{e3d24d5e-80b0-45e1-ad55-d69d00bfa5f8}</Project>
<Name>Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<SDKReference Include="WindowsMobile, Version=10.0.10240.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>

Просмотреть файл

@ -11,6 +11,7 @@
<RootNamespace>SkiaSharpSample.FormsSample.Platform</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>SkiaSharpSampleFormsSampleiOS</AssemblyName>
<NuGetPackageImportStamp></NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
@ -113,11 +114,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.60.0" />
<PackageReference Include="Xamarin.Forms" Version="2.4.0.269-pre2" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.59.1" />
<PackageReference Include="Xamarin.Forms" Version="2.3.4.231" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj">
@ -128,30 +131,11 @@
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="..\..\SkiaSharpSample.Shared\Media\content-font.ttf">
<Link>Resources\content-font.ttf</Link>
</BundleResource>
</ItemGroup>
<ItemGroup>
<ITunesArtwork Include="iTunesArtwork" />
<ITunesArtwork Include="iTunesArtwork@2x" />
</ItemGroup>
<ItemGroup>
<None Include="Entitlements.plist" />
<None Include="Info.plist" />
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Resources\Media.xcassets\AppIcons.appiconset\Contents.json">
<InProject>false</InProject>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\hamburger%402x.png" />
<BundleResource Include="Resources\hamburger.png" />
<BundleResource Include="Resources\hamburger%403x.png" />
@ -162,6 +146,13 @@
<BundleResource Include="Resources\configure%402x.png" />
<BundleResource Include="Resources\configure%403x.png" />
<BundleResource Include="Resources\ic_launcher.png" />
<None Include="Entitlements.plist" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
<ITunesArtwork Include="iTunesArtwork" />
<ITunesArtwork Include="iTunesArtwork@2x" />
<ImageAsset Include="Resources\Media.xcassets\AppIcons.appiconset\Contents.json" />
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
</ItemGroup>
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />

Просмотреть файл

@ -48,16 +48,16 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.Mac" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Xamarin.Mac" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.60.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
@ -91,7 +91,7 @@
<Link>Resources\content-font.ttf</Link>
</BundleResource>
</ItemGroup>
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" Condition="Exists('..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems')" />
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" Condition="Exists('..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems')" />
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" />
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
</Project>

Просмотреть файл

@ -87,10 +87,18 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.60.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<Compile Include="ViewController.cs" />
<Compile Include="ViewController.designer.cs">
<DependentUpon>ViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\Contents.json" />
@ -117,14 +125,6 @@
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<Compile Include="ViewController.cs" />
<Compile Include="ViewController.designer.cs">
<DependentUpon>ViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Main.storyboard" />
</ItemGroup>
@ -133,7 +133,7 @@
<Link>Resources\content-font.ttf</Link>
</BundleResource>
</ItemGroup>
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" Condition="Exists('..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems')" />
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" Condition="Exists('..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems')" />
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" />
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\TVOS\Xamarin.TVOS.CSharp.targets" />
</Project>

Просмотреть файл

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="792efd03-834f-4a7f-9997-56d6cc91b3d7" Publisher="CN=mattl" Version="1.0.0.0" />
<Identity Name="792efd03-834f-4a7f-9997-56d6cc91b3d7" Publisher="CN=Matthew" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="792efd03-834f-4a7f-9997-56d6cc91b3d7" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>SkiaSharpSample.UWPSample</DisplayName>
<PublisherDisplayName>mattl</PublisherDisplayName>
<PublisherDisplayName>Matthew</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>

Просмотреть файл

@ -11,12 +11,13 @@
<AssemblyName>SkiaSharpSample.UWPSample</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>UWPSample_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>2022055027C3EEA154DFF420144910E67613D8D6</PackageCertificateThumbprint>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
@ -88,12 +89,27 @@
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="WindowsDesktop, Version=10.0.10240.0">
<Name>Windows Desktop Extensions for the UWP</Name>
</SDKReference>
<SDKReference Include="WindowsMobile, Version=10.0.10240.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\SkiaSharpSample.Shared\Media\content-font.ttf">
<Link>Assets\Media\content-font.ttf</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="project.json" />
<None Include="UWPSample_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
@ -130,14 +146,6 @@
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<SDKReference Include="WindowsDesktop, Version=10.0.10240.0">
<Name>Windows Desktop Extensions for the UWP</Name>
</SDKReference>
<SDKReference Include="WindowsMobile, Version=10.0.10240.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<ItemGroup />
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" />
@ -145,11 +153,4 @@
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Двоичный файл не отображается.

Просмотреть файл

@ -97,10 +97,11 @@
<PackageReference Include="OpenTK" Version="1.1.2349.61993" />
<PackageReference Include="OpenTK.GLControl" Version="1.1.2349.61993" />
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.60.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
@ -119,8 +120,6 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@ -134,6 +133,8 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@ -146,9 +147,6 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />

Просмотреть файл

@ -91,10 +91,11 @@
<PackageReference Include="OpenTK" Version="1.1.2349.61993" />
<PackageReference Include="OpenTK.GLControl" Version="1.1.2349.61993" />
<PackageReference Include="HarfBuzzSharp" Version="1.4.6" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
<PackageReference Include="PCLStorage" Version="1.0.2" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
<PackageReference Include="SkiaSharp.Svg" Version="1.59.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.60.0" />
<PackageReference Include="SkiaSharp.Views" Version="1.59.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">

Просмотреть файл

@ -26,5 +26,5 @@
<ProjectReference Include="..\..\..\binding\SkiaSharp.NetStandard\SkiaSharp.NetStandard.csproj" />
<ProjectReference Include="..\..\..\binding\HarfBuzzSharp.NetStandard\HarfBuzzSharp.NetStandard.csproj" />
</ItemGroup>
<Import Project="..\SkiaSharp.HarfBuzz.Shared\SkiaSharp.HarfBuzz.Shared.projitems" Label="Shared" Condition="Exists('..\SkiaSharp.HarfBuzz.Shared\SkiaSharp.HarfBuzz.Shared.projitems')" />
<Import Project="..\SkiaSharp.HarfBuzz.Shared\SkiaSharp.HarfBuzz.Shared.projitems" Label="Shared" />
</Project>

Просмотреть файл

@ -45,12 +45,6 @@
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.3.4.231" />
</ItemGroup>
<ItemGroup>
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Binding\SkiaSharp.Android\SkiaSharp.Android.csproj">
<Project>{c737dc80-5b71-4b26-a2dc-da30421788b0}</Project>
@ -61,7 +55,13 @@
<Name>SkiaSharp.Views.Android</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" Condition="Exists('..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems')" />
<ItemGroup>
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" />
<Import Project="..\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

Просмотреть файл

@ -46,13 +46,7 @@
<Reference Include="Xamarin.Mac" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.3.5.233-pre1" />
</ItemGroup>
<ItemGroup>
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
<PackageReference Include="Xamarin.Forms" Version="2.3.5.235-pre2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SkiaSharp.Views\SkiaSharp.Views.Mac\SkiaSharp.Views.Mac.csproj">
@ -64,7 +58,13 @@
<Name>SkiaSharp.OSX</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems" Label="Shared" Condition="Exists('..\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems')" />
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" Condition="Exists('..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems')" />
<ItemGroup>
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems" Label="Shared" />
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
</Project>

Просмотреть файл

@ -165,9 +165,9 @@ namespace SkiaSharp.Views.Forms
}
// the user asked for the size
private void OnGetCanvasSize(object sender, GetCanvasSizeEventArgs e)
private void OnGetCanvasSize(object sender, GetPropertyValueEventArgs<SKSize> e)
{
e.CanvasSize = Control?.CanvasSize ?? SKSize.Empty;
e.Value = Control?.CanvasSize ?? SKSize.Empty;
}
}
}

Просмотреть файл

@ -51,6 +51,8 @@ namespace SkiaSharp.Views.Forms
#endif
}
public GRContext GRContext => Control.GRContext;
#if __IOS__
protected void SetDisablesUserInteraction(bool disablesUserInteraction)
{
@ -67,6 +69,7 @@ namespace SkiaSharp.Views.Forms
// unsubscribe from events
oldController.SurfaceInvalidated -= OnSurfaceInvalidated;
oldController.GetCanvasSize -= OnGetCanvasSize;
oldController.GetGRContext -= OnGetGRContext;
}
if (e.NewElement != null)
@ -90,6 +93,7 @@ namespace SkiaSharp.Views.Forms
// subscribe to events from the user
newController.SurfaceInvalidated += OnSurfaceInvalidated;
newController.GetCanvasSize += OnGetCanvasSize;
newController.GetGRContext += OnGetGRContext;
// start the rendering
SetupRenderLoop(false);
@ -163,9 +167,15 @@ namespace SkiaSharp.Views.Forms
}
// the user asked for the size
private void OnGetCanvasSize(object sender, GetCanvasSizeEventArgs e)
private void OnGetCanvasSize(object sender, GetPropertyValueEventArgs<SKSize> e)
{
e.CanvasSize = Control?.CanvasSize ?? SKSize.Empty;
e.Value = Control?.CanvasSize ?? SKSize.Empty;
}
// the user asked for the current GRContext
private void OnGetGRContext(object sender, GetPropertyValueEventArgs<GRContext> e)
{
e.Value = Control?.GRContext;
}
private void OnPaintSurface(object sender, SKNativePaintGLSurfaceEventArgs e)

Просмотреть файл

@ -2,8 +2,8 @@
namespace SkiaSharp.Views.Forms
{
internal class GetCanvasSizeEventArgs : EventArgs
internal class GetPropertyValueEventArgs<T> : EventArgs
{
public SKSize CanvasSize { get; set; }
public T Value { get; set; }
}
}

Просмотреть файл

@ -20,7 +20,7 @@ namespace SkiaSharp.Views.Forms
// the native listens to this event
private event EventHandler SurfaceInvalidated;
private event EventHandler<GetCanvasSizeEventArgs> GetCanvasSize;
private event EventHandler<GetPropertyValueEventArgs<SKSize>> GetCanvasSize;
// the user asks the for the size
public SKSize CanvasSize
@ -28,9 +28,9 @@ namespace SkiaSharp.Views.Forms
get
{
// send a mesage to the native view
var args = new GetCanvasSizeEventArgs();
var args = new GetPropertyValueEventArgs<SKSize>();
GetCanvasSize?.Invoke(this, args);
return args.CanvasSize;
return args.Value;
}
}
@ -73,7 +73,7 @@ namespace SkiaSharp.Views.Forms
remove { SurfaceInvalidated -= value; }
}
event EventHandler<GetCanvasSizeEventArgs> ISKCanvasViewController.GetCanvasSize
event EventHandler<GetPropertyValueEventArgs<SKSize>> ISKCanvasViewController.GetCanvasSize
{
add { GetCanvasSize += value; }
remove { GetCanvasSize -= value; }
@ -99,7 +99,7 @@ namespace SkiaSharp.Views.Forms
{
// the native listens to this event
event EventHandler SurfaceInvalidated;
event EventHandler<GetCanvasSizeEventArgs> GetCanvasSize;
event EventHandler<GetPropertyValueEventArgs<SKSize>> GetCanvasSize;
// the native view tells the user to repaint
void OnPaintSurface(SKPaintSurfaceEventArgs e);

Просмотреть файл

@ -32,7 +32,8 @@ namespace SkiaSharp.Views.Forms
// the native listens to this event
private event EventHandler SurfaceInvalidated;
private event EventHandler<GetCanvasSizeEventArgs> GetCanvasSize;
private event EventHandler<GetPropertyValueEventArgs<SKSize>> GetCanvasSize;
private event EventHandler<GetPropertyValueEventArgs<GRContext>> GetGRContext;
// the user asks the for the size
public SKSize CanvasSize
@ -40,9 +41,21 @@ namespace SkiaSharp.Views.Forms
get
{
// send a mesage to the native view
var args = new GetCanvasSizeEventArgs();
var args = new GetPropertyValueEventArgs<SKSize>();
GetCanvasSize?.Invoke(this, args);
return args.CanvasSize;
return args.Value;
}
}
// the user asks the for the current GRContext
public GRContext GRContext
{
get
{
// send a mesage to the native view
var args = new GetPropertyValueEventArgs<GRContext>();
GetGRContext?.Invoke(this, args);
return args.Value;
}
}
@ -73,12 +86,18 @@ namespace SkiaSharp.Views.Forms
remove { SurfaceInvalidated -= value; }
}
event EventHandler<GetCanvasSizeEventArgs> ISKGLViewController.GetCanvasSize
event EventHandler<GetPropertyValueEventArgs<SKSize>> ISKGLViewController.GetCanvasSize
{
add { GetCanvasSize += value; }
remove { GetCanvasSize -= value; }
}
event EventHandler<GetPropertyValueEventArgs<GRContext>> ISKGLViewController.GetGRContext
{
add { GetGRContext += value; }
remove { GetGRContext -= value; }
}
void ISKGLViewController.OnPaintSurface(SKPaintGLSurfaceEventArgs e)
{
OnPaintSurface(e);
@ -99,7 +118,8 @@ namespace SkiaSharp.Views.Forms
{
// the native listens to this event
event EventHandler SurfaceInvalidated;
event EventHandler<GetCanvasSizeEventArgs> GetCanvasSize;
event EventHandler<GetPropertyValueEventArgs<SKSize>> GetCanvasSize;
event EventHandler<GetPropertyValueEventArgs<GRContext>> GetGRContext;
// the native view tells the user to repaint
void OnPaintSurface(SKPaintGLSurfaceEventArgs e);

Просмотреть файл

@ -11,7 +11,7 @@
<AssemblyName>SkiaSharp.Views.Forms</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
@ -37,15 +37,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
<EmbeddedResource Include="Properties\SkiaSharp.Views.Forms.UWP.rd.xml" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
<PackageReference Include="Xamarin.Forms" Version="2.3.4.231" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Binding\SkiaSharp.UWP\SkiaSharp.UWP.csproj">
@ -57,17 +50,17 @@
<Name>SkiaSharp.Views.UWP</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
<EmbeddedResource Include="Properties\SkiaSharp.Views.Forms.UWP.rd.xml" />
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" />
<Import Project="..\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">C:\Projects\SkiaSharp\source\SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.UWP\project.lock.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\mattl\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">ProjectJson</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.1.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)xamarin.forms\2.3.4.231\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)xamarin.forms\2.3.4.231\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</ImportGroup>
</Project>

Просмотреть файл

@ -1,17 +0,0 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"Xamarin.Forms": "2.3.4.231"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

Просмотреть файл

@ -20,6 +20,12 @@
<WarningLevel>4</WarningLevel>
<MtouchUseSGen>true</MtouchUseSGen>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchLink>
</MtouchLink>
<MtouchHttpClientHandler>
</MtouchHttpClientHandler>
<MtouchTlsProvider>
</MtouchTlsProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
@ -30,6 +36,12 @@
<WarningLevel>4</WarningLevel>
<MtouchUseSGen>true</MtouchUseSGen>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchLink>
</MtouchLink>
<MtouchHttpClientHandler>
</MtouchHttpClientHandler>
<MtouchTlsProvider>
</MtouchTlsProvider>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@ -40,12 +52,6 @@
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.3.4.231" />
</ItemGroup>
<ItemGroup>
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Binding\SkiaSharp.iOS\SkiaSharp.iOS.csproj">
<Project>{6a678cfb-21a7-4e81-8909-fd72abbfd408}</Project>
@ -58,7 +64,13 @@
<IsWatchApp>false</IsWatchApp>
</ProjectReference>
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" Condition="Exists('..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems')" />
<ItemGroup>
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKCanvasViewRenderer.cs" />
<Compile Include="SKImageSourceHandler.cs" />
<Compile Include="SKTouchHandler.cs" />
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" />
<Import Project="..\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
</Project>

Просмотреть файл

@ -40,6 +40,6 @@
<Compile Include="SKGLViewRenderer.cs" />
<Compile Include="SKCanvasViewRenderer.cs" />
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" Condition="Exists('..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems')" />
<Import Project="..\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
</Project>

Просмотреть файл

@ -132,8 +132,11 @@ namespace SkiaSharp.Views.Android
protected override void Dispose(bool disposing)
{
if (disposing)
{
FreeBitmap();
}
base.Dispose(disposing);
FreeBitmap();
}
private void FreeBitmap()

Просмотреть файл

@ -32,6 +32,8 @@ namespace SkiaSharp.Views.Android
public SKSize CanvasSize => renderer.CanvasSize;
public GRContext GRContext => renderer.GRContext;
public virtual void SetRenderer(ISKRenderer renderer)
{
skRenderer = renderer;

Просмотреть файл

@ -13,6 +13,8 @@ namespace SkiaSharp.Views.Android
public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height);
public GRContext GRContext => context;
protected abstract void OnDrawFrame(SKSurface surface, GRBackendRenderTargetDesc renderTarget);
public void OnDrawFrame(IGL10 gl)
@ -79,8 +81,11 @@ namespace SkiaSharp.Views.Android
protected override void Dispose(bool disposing)
{
if (disposing)
{
FreeContext();
}
base.Dispose(disposing);
FreeContext();
}
private void FreeContext()

Просмотреть файл

@ -71,8 +71,11 @@ namespace SkiaSharp.Views.Android
protected override void Dispose(bool disposing)
{
if (disposing)
{
FreeBitmap();
}
base.Dispose(disposing);
FreeBitmap();
}
private void CreateBitmap(int width, int height)

Просмотреть файл

@ -17,7 +17,9 @@ namespace SkiaSharp.Views.iOS
public class SKCanvasView : UIView, IComponent
{
// for IComponent
#pragma warning disable 67
private event EventHandler DisposedInternal;
#pragma warning restore 67
ISite IComponent.Site { get; set; }
event EventHandler IComponent.Disposed
{

Просмотреть файл

@ -30,6 +30,8 @@ namespace SkiaSharp.Views.iOS
public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height);
public GRContext GRContext => context;
public virtual void Render()
{
if (glContext == null)

Просмотреть файл

@ -18,7 +18,9 @@ namespace SkiaSharp.Views.iOS
public class SKGLView : GLKView, IGLKViewDelegate, IComponent
{
// for IComponent
#pragma warning disable 67
private event EventHandler DisposedInternal;
#pragma warning restore 67
ISite IComponent.Site { get; set; }
event EventHandler IComponent.Disposed
{
@ -75,6 +77,8 @@ namespace SkiaSharp.Views.iOS
public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height);
public GRContext GRContext => context;
public new void DrawInRect(GLKView view, CGRect rect)
{
if (designMode)

Просмотреть файл

@ -21,6 +21,8 @@ namespace SkiaSharp.Views.Desktop
public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height);
public GRContext GRContext => grContext;
public event EventHandler<SKPaintGLSurfaceEventArgs> PaintSurface;
protected override void OnPaint(PaintEventArgs e)

Просмотреть файл

@ -14,8 +14,6 @@
<TargetFrameworkProfile />
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\..\mono.snk</AssemblyOriginatorKeyFile>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -45,14 +43,6 @@
<PackageReference Include="OpenTK" Version="1.1.2349.61993" />
<PackageReference Include="OpenTK.GLControl" Version="1.1.2349.61993" />
</ItemGroup>
<ItemGroup>
<Compile Include="SKControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SKGLControl.cs">
<SubType>UserControl</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj">
<Project>{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}</Project>
@ -60,7 +50,8 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<Compile Include="SKControl.cs" />
<Compile Include="SKGLControl.cs" />
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Просмотреть файл

@ -20,6 +20,8 @@ namespace SkiaSharp.Views.Mac
public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height);
public GRContext GRContext => context;
public event EventHandler<SKPaintGLSurfaceEventArgs> PaintSurface;
public virtual void DrawInSurface(SKSurface surface, GRBackendRenderTargetDesc renderTarget)

Просмотреть файл

@ -63,6 +63,8 @@ namespace SkiaSharp.Views.Mac
public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height);
public GRContext GRContext => context;
public override void PrepareOpenGL()
{
base.PrepareOpenGL();

Просмотреть файл

@ -25,6 +25,8 @@ namespace SkiaSharp.Views.UWP
public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height);
public GRContext GRContext => context;
protected override Size ArrangeOverride(Size finalSize)
{
var arrange = base.ArrangeOverride(finalSize);

Просмотреть файл

@ -11,7 +11,7 @@
<AssemblyName>SkiaSharp.Views.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
@ -39,8 +39,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Binding\SkiaSharp.UWP\SkiaSharp.UWP.csproj">
<Project>{bab615aa-956e-4079-b260-dd7b1f52ec7d}</Project>
<Name>SkiaSharp.UWP</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AngleSwapChainPanel.cs" />
@ -53,22 +58,9 @@
<Compile Include="UWPExtensions.cs" />
<EmbeddedResource Include="Properties\SkiaSharp.Views.UWP.rd.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Binding\SkiaSharp.UWP\SkiaSharp.UWP.csproj">
<Project>{bab615aa-956e-4079-b260-dd7b1f52ec7d}</Project>
<Name>SkiaSharp.UWP</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,16 +0,0 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

Просмотреть файл

@ -84,8 +84,22 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.6.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.7.0" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\binding\HarfBuzzSharp.Desktop\HarfBuzzSharp.Desktop.csproj">
<Project>{2ae5d8c5-eac6-4515-89f2-a4994b41c925}</Project>
<Name>HarfBuzzSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj">
<Project>{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}</Project>
<Name>SkiaSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\source\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz.csproj">
<Project>{7cad1912-05a5-42e5-b7ba-81bb051f0566}</Project>
<Name>SkiaSharp.HarfBuzz</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
@ -175,23 +189,6 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\binding\HarfBuzzSharp.Desktop\HarfBuzzSharp.Desktop.csproj">
<Project>{2ae5d8c5-eac6-4515-89f2-a4994b41c925}</Project>
<Name>HarfBuzzSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj">
<Project>{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}</Project>
<Name>SkiaSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\source\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz.csproj">
<Project>{7cad1912-05a5-42e5-b7ba-81bb051f0566}</Project>
<Name>SkiaSharp.HarfBuzz</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets" Condition="Exists('..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets')" />
<Import Project="..\..\binding\HarfBuzzSharp.Desktop\bin\$(Configuration)\nuget\build\net45\HarfBuzzSharp.Desktop.targets" Condition="Exists('..\..\binding\HarfBuzzSharp.Desktop\bin\$(Configuration)\nuget\build\net45\HarfBuzzSharp.Desktop.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Просмотреть файл

@ -6,6 +6,7 @@
<ApplicationIcon />
<OutputTypeEx>exe</OutputTypeEx>
<StartupObject />
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -12,6 +12,11 @@
<PackageTargetFallback>$(PackageTargetFallback);portable-net451+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.6.1" />
<PackageReference Include="SkiaSharp" Version="1.59.1" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.59.0-beta" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Tests\*.cs" Link="%(FileName)%(Extension)" />
<Compile Include="..\Tests\GlContexts\*.cs" Link="GlContexts\%(FileName)%(Extension)" />
@ -30,9 +35,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.6.1" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
</ItemGroup>
</Project>