зеркало из https://github.com/mono/SkiaSharp.git
removed old tvos view showcase
This commit is contained in:
Родитель
67c98ef8d6
Коммит
df5a5e4414
|
@ -1,37 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicSkiaSharp", "BasicSkiaSharp\BasicSkiaSharp.csproj", "{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}"
|
||||
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("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.tvOS", "..\..\..\views\SkiaSharp.Views.tvOS\SkiaSharp.Views.tvOS.csproj", "{E5973829-6C8B-43E4-B81B-C8492DF26C90}"
|
||||
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
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{E5973829-6C8B-43E4-B81B-C8492DF26C90}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -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,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"layers" : [
|
||||
{
|
||||
"filename" : "Front.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Middle.imagestacklayer"
|
||||
},
|
||||
{
|
||||
"filename" : "Back.imagestacklayer"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"assets" : [
|
||||
{
|
||||
"size" : "1280x768",
|
||||
"idiom" : "tv",
|
||||
"filename" : "App Icon - Large.imagestack",
|
||||
"role" : "primary-app-icon"
|
||||
},
|
||||
{
|
||||
"size" : "400x240",
|
||||
"idiom" : "tv",
|
||||
"filename" : "App Icon - Small.imagestack",
|
||||
"role" : "primary-app-icon"
|
||||
},
|
||||
{
|
||||
"size" : "2320x720",
|
||||
"idiom" : "tv",
|
||||
"filename" : "Top Shelf Image Wide.imageset",
|
||||
"role" : "top-shelf-image-wide"
|
||||
},
|
||||
{
|
||||
"size" : "1920x720",
|
||||
"idiom" : "tv",
|
||||
"filename" : "Top Shelf Image.imageset",
|
||||
"role" : "top-shelf-image"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "universal"
|
||||
},
|
||||
{
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -1,162 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"minimum-system-version": "8.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "414x736",
|
||||
"subtype": "736h",
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "8.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "375x667",
|
||||
"subtype": "667h",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "8.0",
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"size": "736x414",
|
||||
"subtype": "736h",
|
||||
"scale": "3x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "320x480",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "320x568",
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "768x1024",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "768x1024",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"size": "1024x768",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"minimum-system-version": "7.0",
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"size": "1024x768",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "320x480",
|
||||
"scale": "1x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "320x480",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "320x568",
|
||||
"subtype": "retina4",
|
||||
"scale": "2x",
|
||||
"idiom": "iphone"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "768x1024",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "full-screen",
|
||||
"size": "768x1024",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "to-status-bar",
|
||||
"size": "768x1004",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "portrait",
|
||||
"extent": "to-status-bar",
|
||||
"size": "768x1004",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"size": "1024x768",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "full-screen",
|
||||
"size": "1024x768",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "to-status-bar",
|
||||
"size": "1024x748",
|
||||
"scale": "1x",
|
||||
"idiom": "ipad"
|
||||
},
|
||||
{
|
||||
"orientation": "landscape",
|
||||
"extent": "to-status-bar",
|
||||
"size": "1024x748",
|
||||
"scale": "2x",
|
||||
"idiom": "ipad"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
|
@ -1,146 +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>{49CF528B-AC43-4AC8-B7CE-3E8A98B7892B}</ProjectGuid>
|
||||
<ProjectTypeGuids>{06FA79CB-D6CD-4721-BB4B-1BD202089C55};{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;</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>x86_64</MtouchArch>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||
<MtouchTlsProvider>Default</MtouchTlsProvider>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchUseLlvm>true</MtouchUseLlvm>
|
||||
<MtouchUseSGen>true</MtouchUseSGen>
|
||||
<MtouchUseRefCounting>true</MtouchUseRefCounting>
|
||||
<MtouchFloat32>true</MtouchFloat32>
|
||||
<MtouchEnableBitcode>true</MtouchEnableBitcode>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>SdkOnly</MtouchLink>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</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>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||
<MtouchTlsProvider>Default</MtouchTlsProvider>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</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>SdkOnly</MtouchLink>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||
<MtouchTlsProvider>Default</MtouchTlsProvider>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.TVOS" />
|
||||
<Reference Include="SkiaSharp">
|
||||
<HintPath>..\packages\SkiaSharp.1.54.1\lib\XamarintvOS\SkiaSharp.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Large.imagestack\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Large.imagestack\Back.imagestacklayer\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Large.imagestack\Back.imagestacklayer\Content.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Large.imagestack\Front.imagestacklayer\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Large.imagestack\Front.imagestacklayer\Content.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Large.imagestack\Middle.imagestacklayer\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Large.imagestack\Middle.imagestacklayer\Content.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Small.imagestack\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Small.imagestack\Back.imagestacklayer\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Small.imagestack\Back.imagestacklayer\Content.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Small.imagestack\Front.imagestacklayer\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Small.imagestack\Front.imagestacklayer\Content.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Small.imagestack\Middle.imagestacklayer\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\App Icon - Small.imagestack\Middle.imagestacklayer\Content.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\Top Shelf Image Wide.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\App Icon & Top Shelf Image.brandassets\Top Shelf Image.imageset\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\LaunchImages.launchimage\Contents.json" />
|
||||
<ImageAsset Include="Assets.xcassets\Contents.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
</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>
|
||||
<InterfaceDefinition Include="Main.storyboard" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\views\SkiaSharp.Views.tvOS\SkiaSharp.Views.tvOS.csproj">
|
||||
<Project>{E5973829-6C8B-43E4-B81B-C8492DF26C90}</Project>
|
||||
<Name>SkiaSharp.Views.tvOS</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\TVOS\Xamarin.TVOS.CSharp.targets" />
|
||||
</Project>
|
|
@ -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,32 +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>CFBundleDisplayName</key>
|
||||
<string>BasicSkiaSharp</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>BasicSkiaSharp</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.companyname.basicskiasharp</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>3</integer>
|
||||
</array>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/App Icon & Top Shelf Image.brandassets</string>
|
||||
<key>XSLaunchImageAssets</key>
|
||||
<string>Assets.xcassets/LaunchImages.launchimage</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -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,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="9046" systemVersion="14F27" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9035" />
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" 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="1920" height="1080" />
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="calibratedWhite" />
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder" />
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -1,205 +0,0 @@
|
|||
using System;
|
||||
using CoreGraphics;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.Views;
|
||||
using UIKit;
|
||||
|
||||
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;
|
||||
|
||||
public 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 headerHeight = 32f;
|
||||
var topHeader = new CGRect(headerHeight, 0, View.Bounds.Width - headerHeight, headerHeight);
|
||||
var leftHeader = new CGRect(0, headerHeight, headerHeight, View.Bounds.Height - headerHeight);
|
||||
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 tvOS 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,17 +0,0 @@
|
|||
//
|
||||
// This file has been generated automatically by MonoDevelop to store outlets and
|
||||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using Foundation;
|
||||
|
||||
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="xamarintvos10" />
|
||||
</packages>
|
Загрузка…
Ссылка в новой задаче