Removed the placeholder samples

This commit is contained in:
Matthew Leibowitz 2016-10-04 15:24:56 +02:00
Родитель f07f23b54b
Коммит 47e84f8efa
47 изменённых файлов: 0 добавлений и 5851 удалений

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

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3E545DA0-D1D8-49A9-B596-D9796C863B96}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>BasicSkiaSharp</RootNamespace>
<AssemblyName>BasicSkiaSharp</AssemblyName>
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="Xamarin.Android.Support.v4">
<HintPath>packages\Xamarin.Android.Support.v4.23.1.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.AppCompat">
<HintPath>packages\Xamarin.Android.Support.v7.AppCompat.23.1.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
</Reference>
<Reference Include="SkiaSharp">
<HintPath>packages\SkiaSharp.1.54.1\lib\MonoAndroid\SkiaSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Main.axml" />
<AndroidResource Include="Resources\values\Strings.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\Icon.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\views\SkiaSharp.Views.Android\SkiaSharp.Views.Android.csproj">
<Project>{926C8D29-E047-4F4E-8B35-852E47BFA9F5}</Project>
<Name>SkiaSharp.Views.Android</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

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

@ -1,23 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicSkiaSharp", "BasicSkiaSharp.csproj", "{3E545DA0-D1D8-49A9-B596-D9796C863B96}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.Android", "..\..\..\views\SkiaSharp.Views.Android\SkiaSharp.Views.Android.csproj", "{926C8D29-E047-4F4E-8B35-852E47BFA9F5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3E545DA0-D1D8-49A9-B596-D9796C863B96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E545DA0-D1D8-49A9-B596-D9796C863B96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E545DA0-D1D8-49A9-B596-D9796C863B96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E545DA0-D1D8-49A9-B596-D9796C863B96}.Release|Any CPU.Build.0 = Release|Any CPU
{926C8D29-E047-4F4E-8B35-852E47BFA9F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{926C8D29-E047-4F4E-8B35-852E47BFA9F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{926C8D29-E047-4F4E-8B35-852E47BFA9F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{926C8D29-E047-4F4E-8B35-852E47BFA9F5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

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

@ -1,143 +0,0 @@
using System;
using System.Threading.Tasks;
using Android.App;
using Android.Content;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using SkiaSharp;
using SkiaSharp.Views;
namespace BasicSkiaSharp
{
[Activity(Label = "BasicSkiaSharp", MainLauncher = true, Icon = "@mipmap/icon")]
public class MainActivity : Activity, ISurfaceHolderCallback
{
private MySoftwareView softwareView;
private SKSurfaceView surfaceView;
private SKGLSurfaceView hardwareView;
private MyHardwareViewRenderer hardwarRenderer;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Main);
var linearLayout = FindViewById<LinearLayout>(Resource.Id.linearLayout);
var landscape = Resources.Configuration.Orientation == Android.Content.Res.Orientation.Landscape;
linearLayout.Orientation = landscape ? Orientation.Horizontal : Orientation.Vertical;
var softwareLayout = FindViewById<LinearLayout>(Resource.Id.softwareLayout);
var surfaceLayout = FindViewById<LinearLayout>(Resource.Id.surfaceLayout);
var hardwareLayout = FindViewById<LinearLayout>(Resource.Id.hardwareLayout);
var match = ViewGroup.LayoutParams.MatchParent;
// layout the various views
// the software view
softwareView = new MySoftwareView(this);
softwareLayout.AddView(softwareView, new LinearLayout.LayoutParams(match, match, 1));
// the software view using a surface
surfaceView = new SKSurfaceView(this);
surfaceView.SetZOrderOnTop(true);
surfaceView.Holder.SetFormat(Format.Translucent);
surfaceView.Holder.AddCallback(this);
surfaceLayout.AddView(surfaceView, new LinearLayout.LayoutParams(match, match, 1));
// the hardware view
hardwareView = new SKGLSurfaceView(this);
hardwareView.SetZOrderOnTop(true);
hardwareView.Holder.SetFormat(Format.Translucent);
hardwarRenderer = new MyHardwareViewRenderer();
hardwareView.SetRenderer(hardwarRenderer);
hardwareLayout.AddView(hardwareView, new LinearLayout.LayoutParams(match, match, 1));
}
protected override void OnResume()
{
base.OnResume();
softwareView.PostInvalidateDelayed(5000);
}
// the real draw method
private static void Draw(SKSurface surface, SKSize size)
{
const int stroke = 4;
const int curve = 20;
const int textSize = 60;
const int shrink = stroke / -2;
var canvas = surface.Canvas;
canvas.Clear(SKColors.Transparent);
using (var paint = new SKPaint())
{
paint.IsAntialias = true;
paint.TextSize = textSize;
paint.Color = SKColors.Orchid;
var r = SKRect.Create(SKPoint.Empty, size);
canvas.DrawRoundRect(r, curve, curve, paint);
paint.Color = SKColors.GreenYellow;
canvas.DrawText("Hello Droid World!", 30, textSize + 10, paint);
paint.Color = SKColors.Orange.WithAlpha(100);
canvas.DrawOval(SKRect.Create(50, 50, 100, 100), paint);
paint.IsStroke = true;
paint.StrokeWidth = stroke;
paint.Color = SKColors.Black;
r.Inflate(shrink, shrink);
canvas.DrawRoundRect(r, curve - stroke, curve - stroke, paint);
}
}
// drawing the surface after creation
void ISurfaceHolderCallback.SurfaceChanged(ISurfaceHolder holder, [GeneratedEnum] Format format, int width, int height)
{
// asynchronous drawing to the surface
var lockedSurface = surfaceView.LockSurface();
MainActivity.Draw(lockedSurface.Surface, lockedSurface.ImageInfo.Size);
surfaceView.UnlockSurfaceAndPost(lockedSurface);
}
// don't care about this
void ISurfaceHolderCallback.SurfaceCreated(ISurfaceHolder holder) { }
void ISurfaceHolderCallback.SurfaceDestroyed(ISurfaceHolder holder) { }
// the custom view
private class MySoftwareView : SKView
{
public MySoftwareView(Context context)
: base(context)
{
}
protected override void OnDraw(SKSurface surface, SKImageInfo info)
{
base.OnDraw(surface, info);
MainActivity.Draw(surface, info.Size);
}
}
// the custom renderer
private class MyHardwareViewRenderer : SKGLSurfaceView.ISKRenderer
{
public void OnDrawFrame(SKSurface surface, GRBackendRenderTargetDesc renderTarget)
{
MainActivity.Draw(surface, new SKSizeI(renderTarget.Width, renderTarget.Height));
}
}
}
}

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

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.basicskiasharp">
<uses-sdk android:minSdkVersion="10" />
<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:theme="@style/Theme.AppCompat">
</application>
</manifest>

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

@ -1,27 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Android.App;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("BasicSkiaSharp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("(c) Matthew Leibowitz")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/linearLayout"
android:minWidth="25px"
android:minHeight="25px">
<LinearLayout
android:orientation="vertical"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/softwareLayout"
android:layout_weight="1"
android:layout_margin="6dp">
<TextView
android:text="Software"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/surfaceLayout"
android:layout_weight="1"
android:layout_margin="6dp">
<TextView
android:text="Surface"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/hardwareLayout"
android:layout_weight="1"
android:layout_margin="6dp">
<TextView
android:text="Hardware"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" />
</LinearLayout>
</LinearLayout>

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

До

Ширина:  |  Высота:  |  Размер: 2.1 KiB

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

До

Ширина:  |  Высота:  |  Размер: 1.4 KiB

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

До

Ширина:  |  Высота:  |  Размер: 3.2 KiB

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

До

Ширина:  |  Высота:  |  Размер: 5.3 KiB

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

До

Ширина:  |  Высота:  |  Размер: 7.6 KiB

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

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, Click Me!</string>
<string name="app_name">BasicSkiaSharp</string>
</resources>

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

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SkiaSharp" version="1.54.1" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v4" version="23.1.1.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="23.1.1.0" targetFramework="monoandroid60" />
</packages>

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

@ -1,8 +0,0 @@
<Application
x:Class="BasicSkiaSharp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BasicSkiaSharp"
RequestedTheme="Light">
</Application>

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

@ -1,106 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace BasicSkiaSharp
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

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

До

Ширина:  |  Высота:  |  Размер: 1.4 KiB

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

До

Ширина:  |  Высота:  |  Размер: 7.5 KiB

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

До

Ширина:  |  Высота:  |  Размер: 2.9 KiB

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

До

Ширина:  |  Высота:  |  Размер: 1.6 KiB

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

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

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

До

Ширина:  |  Высота:  |  Размер: 1.4 KiB

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

До

Ширина:  |  Высота:  |  Размер: 3.1 KiB

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

@ -1,146 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.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>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BasicSkiaSharp</RootNamespace>
<AssemblyName>BasicSkiaSharp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10586.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>BasicSkiaSharp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="BasicSkiaSharp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\views\SkiaSharp.Views.UWP\SkiaSharp.Views.UWP.csproj">
<Project>{8bb20362-91a2-4206-944d-634070eac6f3}</Project>
<Name>SkiaSharp.Views.UWP</Name>
</ProjectReference>
</ItemGroup>
<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,9 +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="'$(NuGetPackageRoot)' == ''">
<NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
<Import Project="$(NuGetPackageRoot)\SkiaSharp\1.54.1\build\uap10.0\SkiaSharp.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp\1.54.1\build\uap10.0\SkiaSharp.targets')" />
</ImportGroup>
</Project>

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

@ -1,84 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicSkiaSharp", "BasicSkiaSharp.csproj", "{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.UWP", "..\..\..\views\SkiaSharp.Views.UWP\SkiaSharp.Views.UWP.csproj", "{8BB20362-91A2-4206-944D-634070EAC6F3}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.Windows", "..\..\..\views\SkiaSharp.Views.Windows\SkiaSharp.Views.Windows.shproj", "{5A67972C-1C04-4913-9950-06A03BFE9533}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkiaSharp.Views.UWP.Interop", "..\..\..\views\SkiaSharp.Views.UWP.Interop\SkiaSharp.Views.UWP.Interop.vcxproj", "{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\views\SkiaSharp.Views.Windows\SkiaSharp.Views.Windows.projitems*{5a67972c-1c04-4913-9950-06a03bfe9533}*SharedItemsImports = 13
..\..\..\views\SkiaSharp.Views.Windows\SkiaSharp.Views.Windows.projitems*{8bb20362-91a2-4206-944d-634070eac6f3}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|Any CPU.ActiveCfg = Debug|x86
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|ARM.ActiveCfg = Debug|ARM
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|ARM.Build.0 = Debug|ARM
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|ARM.Deploy.0 = Debug|ARM
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|x64.ActiveCfg = Debug|x64
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|x64.Build.0 = Debug|x64
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|x64.Deploy.0 = Debug|x64
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|x86.ActiveCfg = Debug|x86
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|x86.Build.0 = Debug|x86
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Debug|x86.Deploy.0 = Debug|x86
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|Any CPU.ActiveCfg = Release|x86
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|ARM.ActiveCfg = Release|ARM
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|ARM.Build.0 = Release|ARM
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|ARM.Deploy.0 = Release|ARM
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|x64.ActiveCfg = Release|x64
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|x64.Build.0 = Release|x64
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|x64.Deploy.0 = Release|x64
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|x86.ActiveCfg = Release|x86
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|x86.Build.0 = Release|x86
{93EC6366-6C93-42AF-B12B-3A68EA5EBCEA}.Release|x86.Deploy.0 = Release|x86
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|ARM.Build.0 = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|x64.ActiveCfg = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|x64.Build.0 = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|x86.ActiveCfg = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Debug|x86.Build.0 = Debug|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|Any CPU.Build.0 = Release|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|ARM.ActiveCfg = Release|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|ARM.Build.0 = Release|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|x64.ActiveCfg = Release|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|x64.Build.0 = Release|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|x86.ActiveCfg = Release|Any CPU
{8BB20362-91A2-4206-944D-634070EAC6F3}.Release|x86.Build.0 = Release|Any CPU
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Debug|Any CPU.ActiveCfg = Debug|Win32
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Debug|ARM.ActiveCfg = Debug|ARM
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Debug|ARM.Build.0 = Debug|ARM
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Debug|x64.ActiveCfg = Debug|x64
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Debug|x64.Build.0 = Debug|x64
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Debug|x86.ActiveCfg = Debug|Win32
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Debug|x86.Build.0 = Debug|Win32
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Release|Any CPU.ActiveCfg = Release|Win32
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Release|ARM.ActiveCfg = Release|ARM
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Release|ARM.Build.0 = Release|ARM
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Release|x64.ActiveCfg = Release|x64
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Release|x64.Build.0 = Release|x64
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Release|x86.ActiveCfg = Release|Win32
{162D75E5-B52A-4B43-B896-5D3F3A7AB90C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

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

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

@ -1,18 +0,0 @@
<Page
x:Class="BasicSkiaSharp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BasicSkiaSharp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Padding="12">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Hardware" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30" FontWeight="Bold" />
<local:SKSwapChainPanel x:Name="swapChainPanel" Margin="6" Grid.Row="1" PaintSurface="swapChainPanel_PaintSurface" />
</Grid>
</Page>

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

@ -1,58 +0,0 @@
using SkiaSharp;
using SkiaSharp.Views;
using Windows.UI.Xaml.Controls;
namespace BasicSkiaSharp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();
swapChainPanel.CompositionScaleChanged += (sender, e) => System.Diagnostics.Debug.WriteLine(
$"{swapChainPanel.CompositionScaleX}x{swapChainPanel.CompositionScaleY}");
}
// the real draw method
private static void Draw(SKSurface surface, SKSize size)
{
const int stroke = 4;
const int curve = 20;
const int textSize = 60;
const int shrink = stroke / -2;
var canvas = surface.Canvas;
canvas.Clear(SKColors.Transparent);
using (var paint = new SKPaint())
{
paint.IsAntialias = true;
paint.TextSize = textSize;
paint.Color = SKColors.Orchid;
var r = SKRect.Create(SKPoint.Empty, size);
canvas.DrawRoundRect(r, curve, curve, paint);
paint.Color = SKColors.GreenYellow;
canvas.DrawText("Hello UWP World!", 30, textSize + 10, paint);
paint.Color = SKColors.Orange.WithAlpha(100);
canvas.DrawOval(SKRect.Create(50, 50, 100, 100), paint);
paint.IsStroke = true;
paint.StrokeWidth = stroke;
paint.Color = SKColors.Black;
r.Inflate(shrink, shrink);
canvas.DrawRoundRect(r, curve - stroke, curve - stroke, paint);
}
}
// from the hardware panel
private void swapChainPanel_PaintSurface(object sender, SKPaintGLSurfaceEventArgs e)
{
Draw(e.Surface, new SKSize(e.RenderTarget.Width, e.RenderTarget.Height));
}
}
}

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

@ -1,49 +0,0 @@
<?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="f7f4ce8d-584a-4680-8f7d-e90947498642"
Publisher="CN=mattl"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="f7f4ce8d-584a-4680-8f7d-e90947498642" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>BasicSkiaSharp</DisplayName>
<PublisherDisplayName>mattl</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="BasicSkiaSharp.App">
<uap:VisualElements
DisplayName="BasicSkiaSharp"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="BasicSkiaSharp"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

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

@ -1,29 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BasicSkiaSharp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BasicSkiaSharp")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

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

@ -1,31 +0,0 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

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

@ -1,17 +0,0 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
"SkiaSharp": "1.54.1"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

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

@ -1,59 +0,0 @@
using Foundation;
using UIKit;
namespace BasicSkiaSharp
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
[Register("AppDelegate")]
public class AppDelegate : UIApplicationDelegate
{
// class-level declarations
public override UIWindow Window
{
get;
set;
}
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
return true;
}
public override void OnResignActivation(UIApplication application)
{
// Invoked when the application is about to move from active to inactive state.
// This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
// or when the user quits the application and it begins the transition to the background state.
// Games should use this method to pause the game.
}
public override void DidEnterBackground(UIApplication application)
{
// Use this method to release shared resources, save user data, invalidate timers and store the application state.
// If your application supports background exection this method is called instead of WillTerminate when the user quits.
}
public override void WillEnterForeground(UIApplication application)
{
// Called as part of the transiton from background to active state.
// Here you can undo many of the changes made on entering the background.
}
public override void OnActivated(UIApplication application)
{
// Restart any tasks that were paused (or not yet started) while the application was inactive.
// If the application was previously in the background, optionally refresh the user interface.
}
public override void WillTerminate(UIApplication application)
{
// Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
}
}
}

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

@ -1,157 +0,0 @@
{
"images": [
{
"idiom": "iphone",
"size": "29x29",
"scale": "1x"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "3x"
},
{
"idiom": "iphone",
"size": "57x57",
"scale": "1x"
},
{
"idiom": "iphone",
"size": "57x57",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "2x"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "3x"
},
{
"idiom": "ipad",
"size": "29x29",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "29x29",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "40x40",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "40x40",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "50x50",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "50x50",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "72x72",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "72x72",
"scale": "2x"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "1x"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "2x"
},
{
"size": "24x24",
"idiom": "watch",
"scale": "2x",
"role": "notificationCenter",
"subtype": "38mm"
},
{
"size": "27.5x27.5",
"idiom": "watch",
"scale": "2x",
"role": "notificationCenter",
"subtype": "42mm"
},
{
"size": "29x29",
"idiom": "watch",
"role": "companionSettings",
"scale": "2x"
},
{
"size": "29x29",
"idiom": "watch",
"role": "companionSettings",
"scale": "3x"
},
{
"size": "40x40",
"idiom": "watch",
"scale": "2x",
"role": "appLauncher",
"subtype": "38mm"
},
{
"size": "44x44",
"idiom": "watch",
"scale": "2x",
"role": "longLook",
"subtype": "42mm"
},
{
"size": "86x86",
"idiom": "watch",
"scale": "2x",
"role": "quickLook",
"subtype": "38mm"
},
{
"size": "98x98",
"idiom": "watch",
"scale": "2x",
"role": "quickLook",
"subtype": "42mm"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

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

@ -1,6 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

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

@ -1,133 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>BasicSkiaSharp</RootNamespace>
<AssemblyName>BasicSkiaSharp</AssemblyName>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<MtouchFastDev>true</MtouchFastDev>
<MtouchProfiling>true</MtouchProfiling>
<MtouchUseSGen>true</MtouchUseSGen>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchLink>None</MtouchLink>
<MtouchArch>i386, x86_64</MtouchArch>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<PlatformTarget>x86</PlatformTarget>
<MtouchFloat32>true</MtouchFloat32>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType></DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchUseSGen>true</MtouchUseSGen>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchFloat32>true</MtouchFloat32>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchLink>Full</MtouchLink>
<MtouchArch>ARMv7, ARMv7s, ARM64</MtouchArch>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchUseSGen>true</MtouchUseSGen>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchLink>Full</MtouchLink>
<MtouchArch>i386, x86_64</MtouchArch>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<PlatformTarget>x86</PlatformTarget>
<MtouchFloat32>true</MtouchFloat32>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<DeviceSpecificBuild>true</DeviceSpecificBuild>
<MtouchDebug>true</MtouchDebug>
<MtouchFastDev>true</MtouchFastDev>
<MtouchProfiling>true</MtouchProfiling>
<MtouchUseSGen>true</MtouchUseSGen>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchFloat32>true</MtouchFloat32>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchLink>None</MtouchLink>
<MtouchArch>ARMv7, ARMv7s, ARM64</MtouchArch>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="SkiaSharp">
<HintPath>packages\SkiaSharp.1.54.1\lib\XamariniOS\SkiaSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
<ImageAsset Include="Assets.xcassets\Contents.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="LaunchScreen.storyboard" />
<InterfaceDefinition Include="Main.storyboard" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
<None Include="packages.config" />
</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>
<BundleResource Include="Resources\skia_512.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\views\SkiaSharp.Views.iOS\SkiaSharp.Views.iOS.csproj">
<Project>{74C78108-9199-4A7A-928C-FC4DC57D0AE4}</Project>
<Name>SkiaSharp.Views.iOS</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
</Project>

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

@ -1,37 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicSkiaSharp", "BasicSkiaSharp.csproj", "{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.iOS", "..\..\..\views\SkiaSharp.Views.iOS\SkiaSharp.Views.iOS.csproj", "{74C78108-9199-4A7A-928C-FC4DC57D0AE4}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.Apple", "..\..\..\views\SkiaSharp.Views.Apple\SkiaSharp.Views.Apple.shproj", "{CBCA14E7-96C9-4697-909C-19B1EF7298F7}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.AppleiOS", "..\..\..\views\SkiaSharp.Views.AppleiOS\SkiaSharp.Views.AppleiOS.shproj", "{FF4C9F9F-7A6A-44D1-8338-D30E39E4E9D4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Release|iPhone.ActiveCfg = Release|iPhone
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Release|iPhone.Build.0 = Release|iPhone
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Debug|iPhone.ActiveCfg = Debug|iPhone
{BD2BA0D6-FEEC-4DAC-9541-99F65C1DDBA5}.Debug|iPhone.Build.0 = Debug|iPhone
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Release|iPhone.ActiveCfg = Release|Any CPU
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Release|iPhone.Build.0 = Release|Any CPU
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{74C78108-9199-4A7A-928C-FC4DC57D0AE4}.Debug|iPhone.Build.0 = Debug|Any CPU
EndGlobalSection
EndGlobal

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

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

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

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>SimpleSkiaSharp</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.simpleskiasharp</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>

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

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" customColorSpace="sRGB" colorSpace="calibratedRGB" red="0.97254901960784312" green="0.97254901960784312" blue="0.97254901960784312" alpha="1"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="3" translatesAutoresizingMaskIntoConstraints="NO" image="skia_512.png">
<rect key="frame" x="44" y="150.5" width="512" height="299"/>
</imageView>
</subviews>
<constraints>
<constraint id="4" firstItem="3" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX"/>
<constraint id="5" firstItem="3" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY"/>
<constraint id="12" firstItem="3" firstAttribute="height" secondItem="8bC-Xf-vdC" secondAttribute="height"/>
<constraint id="13" firstItem="3" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="12"/>
<exclude reference="13"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<mask key="constraints">
<include reference="12"/>
<include reference="13"/>
</mask>
</variation>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="0.0" y="0.0"/>
</scene>
</scenes>
<resources>
<image name="skia_512.png" width="512" height="299"/>
<image name="skia_1024.png" width="1024" height="597"/>
</resources>
</document>

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

@ -1,15 +0,0 @@
using UIKit;
namespace BasicSkiaSharp
{
public class Application
{
// This is the main entry point of the application.
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");
}
}
}

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

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<subviews/>
</view>
<connections/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="0.0" y="0.0"/>
</scene>
</scenes>
<resources>
<image name="skia_512.png" width="512" height="299"/>
</resources>
</document>

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

До

Ширина:  |  Высота:  |  Размер: 12 KiB

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

@ -1,205 +0,0 @@
using System;
using UIKit;
using SkiaSharp.Views;
using SkiaSharp;
using CoreGraphics;
namespace BasicSkiaSharp
{
public partial class ViewController : UIViewController, ISKLayerDelegate, ISKGLLayerDelegate
{
private MySoftwareView softwareSkiaView;
private SKLayer softwareSkiaLayer;
private UIView softwareSkiaLayerView;
private MyHardwareView hardwareSkiaView;
private SKGLLayer hardwareSkiaLayer;
private UIView hardwareSkiaLayerView;
private UILabel softwareLabel;
private UILabel hardwareLabel;
private UILabel layerLabel;
private UILabel viewLabel;
protected ViewController(IntPtr handle)
: base(handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
// create the labels
var ninety = (float)Math.PI / -2f;
var font = UIFont.BoldSystemFontOfSize(18);
softwareLabel = new UILabel
{
Text = "Software",
TextAlignment = UITextAlignment.Center,
Font = font
};
View.AddSubview(softwareLabel);
hardwareLabel = new UILabel
{
Text = "Hardware",
TextAlignment = UITextAlignment.Center,
Font = font
};
View.AddSubview(hardwareLabel);
layerLabel = new UILabel
{
Text = "Layer",
Transform = CGAffineTransform.MakeRotation(ninety),
TextAlignment = UITextAlignment.Center,
Font = font
};
View.AddSubview(layerLabel);
viewLabel = new UILabel
{
Text = "View",
Transform = CGAffineTransform.MakeRotation(ninety),
TextAlignment = UITextAlignment.Center,
Font = font
};
View.AddSubview(viewLabel);
// create a custom software view
softwareSkiaView = new MySoftwareView();
softwareSkiaView.Opaque = false;
View.AddSubview(softwareSkiaView);
// create a custom hardware view
hardwareSkiaView = new MyHardwareView();
hardwareSkiaView.EnableSetNeedsDisplay = true;
View.AddSubview(hardwareSkiaView);
// add a software layer
softwareSkiaLayerView = new UIView();
View.AddSubview(softwareSkiaLayerView);
softwareSkiaLayer = new SKLayer
{
ContentsScale = UIScreen.MainScreen.Scale,
SKDelegate = this
};
softwareSkiaLayerView.Layer.AddSublayer(softwareSkiaLayer);
// add a hardware layer
hardwareSkiaLayerView = new UIView();
View.AddSubview(hardwareSkiaLayerView);
hardwareSkiaLayer = new SKGLLayer
{
ContentsScale = UIScreen.MainScreen.Scale,
SKDelegate = this
};
hardwareSkiaLayerView.Layer.AddSublayer(hardwareSkiaLayer);
}
public override void ViewWillLayoutSubviews()
{
base.ViewWillLayoutSubviews();
var sbHeight = UIApplication.SharedApplication.StatusBarFrame.Height;
var headerHeight = 32f;
var topHeader = new CGRect(headerHeight, sbHeight, View.Bounds.Width - headerHeight, headerHeight);
var leftHeader = new CGRect(0, sbHeight + headerHeight, headerHeight, View.Bounds.Height - (headerHeight + sbHeight));
var availableSpace = CGRect.FromLTRB(leftHeader.Right, topHeader.Bottom, View.Bounds.Width, View.Bounds.Height);
var colWidth = availableSpace.Width / 2f;
var rowHeight = availableSpace.Height / 2f;
var inset = 12;
// layout the various views
// the labels
softwareLabel.Frame = new CGRect(topHeader.X, topHeader.Y, colWidth, topHeader.Height);
hardwareLabel.Frame = new CGRect(topHeader.X + colWidth, topHeader.Y, colWidth, topHeader.Height);
viewLabel.Frame = new CGRect(leftHeader.X, topHeader.Bottom, leftHeader.Width, rowHeight);
layerLabel.Frame = new CGRect(leftHeader.X, topHeader.Bottom + rowHeight, leftHeader.Width, rowHeight);
// the software view
softwareSkiaView.Frame = new CGRect(availableSpace.X, availableSpace.Y, colWidth, rowHeight).Inset(inset, inset);
// the software layer
softwareSkiaLayerView.Frame = new CGRect(availableSpace.X, availableSpace.Y + rowHeight, colWidth, rowHeight).Inset(inset, inset);
softwareSkiaLayer.Frame = softwareSkiaLayerView.Bounds;
// the hardware view
hardwareSkiaView.Frame = new CGRect(availableSpace.X + colWidth, availableSpace.Y, colWidth, rowHeight).Inset(inset, inset);
// the hardware layer
hardwareSkiaLayerView.Frame = new CGRect(availableSpace.X + colWidth, availableSpace.Y + rowHeight, colWidth, rowHeight).Inset(inset, inset);
hardwareSkiaLayer.Frame = hardwareSkiaLayerView.Bounds;
}
// the real draw method
private static void Draw(SKSurface surface, SKSize size)
{
const int stroke = 4;
const int curve = 20;
const int textSize = 60;
const int shrink = stroke / -2;
var canvas = surface.Canvas;
canvas.Clear(SKColors.Transparent);
using (var paint = new SKPaint())
{
paint.IsAntialias = true;
paint.TextSize = textSize;
paint.Color = SKColors.Orchid;
var r = SKRect.Create(SKPoint.Empty, size);
canvas.DrawRoundRect(r, curve, curve, paint);
paint.Color = SKColors.GreenYellow;
canvas.DrawText("Hello iOS World!", 30, textSize + 10, paint);
paint.Color = SKColors.Orange.WithAlpha(100);
canvas.DrawOval(SKRect.Create(50, 50, 100, 100), paint);
paint.IsStroke = true;
paint.StrokeWidth = stroke;
paint.Color = SKColors.Black;
r.Inflate(shrink, shrink);
canvas.DrawRoundRect(r, curve - stroke, curve - stroke, paint);
}
}
// drawing for the software layer
public void DrawInSurface(SKSurface surface, SKImageInfo info)
{
Draw(surface, info.Size);
}
// drawing for the hardware layer
public void DrawInSurface(SKSurface surface, GRBackendRenderTargetDesc renderTarget)
{
Draw(surface, new SKSize(renderTarget.Width, renderTarget.Height));
}
// the custom view
private class MySoftwareView : SKView
{
public override void Draw(SKSurface surface, SKImageInfo info)
{
base.Draw(surface, info);
ViewController.Draw(surface, info.Size);
}
}
// the custom view
private class MyHardwareView : SKGLView
{
public override void DrawInSurface(SKSurface surface, GRBackendRenderTargetDesc renderTarget)
{
base.DrawInSurface(surface, renderTarget);
ViewController.Draw(surface, new SKSize(renderTarget.Width, renderTarget.Height));
}
}
}
}

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

@ -1,21 +0,0 @@
// WARNING
//
// This file has been generated automatically by Xamarin Studio from the outlets and
// actions declared in your storyboard file.
// Manual changes to this file will not be maintained.
//
using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;
namespace BasicSkiaSharp
{
[Register ("ViewController")]
partial class ViewController
{
void ReleaseDesignerOutlets ()
{
}
}
}

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

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SkiaSharp" version="1.54.1" targetFramework="xamarinios10" />
</packages>