|
@ -19,11 +19,11 @@ SkiaSharp file 1.60.1.0
|
|||
|
||||
# HarfBuzzSharp.dll
|
||||
HarfBuzzSharp assembly 1.0.0.0
|
||||
HarfBuzzSharp file 1.4.6.0
|
||||
HarfBuzzSharp file 1.4.6.1
|
||||
|
||||
# nuget versions
|
||||
SkiaSharp nuget 1.60.1
|
||||
SkiaSharp.Views nuget 1.60.1
|
||||
SkiaSharp.Views.Forms nuget 1.60.1
|
||||
SkiaSharp.HarfBuzz nuget 1.60.1
|
||||
HarfBuzzSharp nuget 1.4.6
|
||||
HarfBuzzSharp nuget 1.4.6.1
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
<Framework Name="harfbuzzsharp-1.4.6.1">
|
||||
<Namespace Name="HarfBuzzSharp">
|
||||
<Type Name="HarfBuzzSharp.Blob" Id="T:HarfBuzzSharp.Blob">
|
||||
<Member Id="M:HarfBuzzSharp.Blob.#ctor(System.IntPtr,System.UInt32,HarfBuzzSharp.MemoryMode,System.Object,HarfBuzzSharp.BlobReleaseDelegate)" />
|
||||
<Member Id="M:HarfBuzzSharp.Blob.Dispose(System.Boolean)" />
|
||||
<Member Id="M:HarfBuzzSharp.Blob.MakeImmutable" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.BlobReleaseDelegate" Id="T:HarfBuzzSharp.BlobReleaseDelegate" />
|
||||
<Type Name="HarfBuzzSharp.Buffer" Id="T:HarfBuzzSharp.Buffer">
|
||||
<Member Id="M:HarfBuzzSharp.Buffer.#ctor" />
|
||||
<Member Id="M:HarfBuzzSharp.Buffer.AddUtf8(System.Byte[])" />
|
||||
<Member Id="M:HarfBuzzSharp.Buffer.AddUtf8(System.String)" />
|
||||
<Member Id="M:HarfBuzzSharp.Buffer.ClearContents" />
|
||||
<Member Id="M:HarfBuzzSharp.Buffer.Dispose(System.Boolean)" />
|
||||
<Member Id="M:HarfBuzzSharp.Buffer.GuessSegmentProperties" />
|
||||
<Member Id="P:HarfBuzzSharp.Buffer.Direction" />
|
||||
<Member Id="P:HarfBuzzSharp.Buffer.GlyphInfos" />
|
||||
<Member Id="P:HarfBuzzSharp.Buffer.GlyphPositions" />
|
||||
<Member Id="P:HarfBuzzSharp.Buffer.Length" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.Direction" Id="T:HarfBuzzSharp.Direction">
|
||||
<Member Id="F:HarfBuzzSharp.Direction.BottomToTop" />
|
||||
<Member Id="F:HarfBuzzSharp.Direction.Invalid" />
|
||||
<Member Id="F:HarfBuzzSharp.Direction.LeftToRight" />
|
||||
<Member Id="F:HarfBuzzSharp.Direction.RightToLeft" />
|
||||
<Member Id="F:HarfBuzzSharp.Direction.TopToBottom" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.Face" Id="T:HarfBuzzSharp.Face">
|
||||
<Member Id="M:HarfBuzzSharp.Face.#ctor(HarfBuzzSharp.Blob,System.UInt32)" />
|
||||
<Member Id="M:HarfBuzzSharp.Face.Dispose(System.Boolean)" />
|
||||
<Member Id="P:HarfBuzzSharp.Face.Index" />
|
||||
<Member Id="P:HarfBuzzSharp.Face.UnitsPerEm" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.Feature" Id="T:HarfBuzzSharp.Feature">
|
||||
<Member Id="P:HarfBuzzSharp.Feature.End" />
|
||||
<Member Id="P:HarfBuzzSharp.Feature.Start" />
|
||||
<Member Id="P:HarfBuzzSharp.Feature.Tag" />
|
||||
<Member Id="P:HarfBuzzSharp.Feature.Value" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.Font" Id="T:HarfBuzzSharp.Font">
|
||||
<Member Id="M:HarfBuzzSharp.Font.#ctor(HarfBuzzSharp.Face)" />
|
||||
<Member Id="M:HarfBuzzSharp.Font.Dispose(System.Boolean)" />
|
||||
<Member Id="M:HarfBuzzSharp.Font.GetScale(System.Int32@,System.Int32@)" />
|
||||
<Member Id="M:HarfBuzzSharp.Font.SetFunctionsOpenType" />
|
||||
<Member Id="M:HarfBuzzSharp.Font.SetScale(System.Int32,System.Int32)" />
|
||||
<Member Id="M:HarfBuzzSharp.Font.Shape(HarfBuzzSharp.Buffer,HarfBuzzSharp.Feature[])" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.GlyphInfo" Id="T:HarfBuzzSharp.GlyphInfo">
|
||||
<Member Id="P:HarfBuzzSharp.GlyphInfo.Cluster" />
|
||||
<Member Id="P:HarfBuzzSharp.GlyphInfo.Codepoint" />
|
||||
<Member Id="P:HarfBuzzSharp.GlyphInfo.Mask" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.GlyphPosition" Id="T:HarfBuzzSharp.GlyphPosition">
|
||||
<Member Id="P:HarfBuzzSharp.GlyphPosition.XAdvance" />
|
||||
<Member Id="P:HarfBuzzSharp.GlyphPosition.XOffset" />
|
||||
<Member Id="P:HarfBuzzSharp.GlyphPosition.YAdvance" />
|
||||
<Member Id="P:HarfBuzzSharp.GlyphPosition.YOffset" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.MemoryMode" Id="T:HarfBuzzSharp.MemoryMode">
|
||||
<Member Id="F:HarfBuzzSharp.MemoryMode.Duplicate" />
|
||||
<Member Id="F:HarfBuzzSharp.MemoryMode.ReadOnly" />
|
||||
<Member Id="F:HarfBuzzSharp.MemoryMode.ReadOnlyMayMakeWriteable" />
|
||||
<Member Id="F:HarfBuzzSharp.MemoryMode.Writeable" />
|
||||
</Type>
|
||||
<Type Name="HarfBuzzSharp.NativeObject" Id="T:HarfBuzzSharp.NativeObject">
|
||||
<Member Id="M:HarfBuzzSharp.NativeObject.Dispose" />
|
||||
<Member Id="M:HarfBuzzSharp.NativeObject.Dispose(System.Boolean)" />
|
||||
<Member Id="M:HarfBuzzSharp.NativeObject.Finalize" />
|
||||
<Member Id="P:HarfBuzzSharp.NativeObject.Handle" />
|
||||
</Type>
|
||||
</Namespace>
|
||||
</Framework>
|
|
@ -9,19 +9,19 @@ using Android.OS;
|
|||
|
||||
namespace SkiaSharpSample.Droid
|
||||
{
|
||||
[Activity(Label = "SkiaSharpSample", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate(Bundle bundle)
|
||||
{
|
||||
TabLayoutResource = Resource.Layout.Tabbar;
|
||||
ToolbarResource = Resource.Layout.Toolbar;
|
||||
[Activity(Label = "SkiaSharpSample", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate(Bundle bundle)
|
||||
{
|
||||
TabLayoutResource = Resource.Layout.Tabbar;
|
||||
ToolbarResource = Resource.Layout.Toolbar;
|
||||
|
||||
base.OnCreate(bundle);
|
||||
base.OnCreate(bundle);
|
||||
|
||||
global::Xamarin.Forms.Forms.Init(this, bundle);
|
||||
LoadApplication(new App());
|
||||
}
|
||||
}
|
||||
global::Xamarin.Forms.Forms.Init(this, bundle);
|
||||
LoadApplication(new App());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
|
||||
namespace SkiaSharpSample
|
||||
{
|
||||
public class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
|
||||
{
|
||||
protected override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
|
||||
LoadApplication(new App());
|
||||
}
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var app = new Program();
|
||||
global::Xamarin.Forms.Platform.Tizen.Forms.Init(app);
|
||||
app.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace SkiaSharpSample
|
||||
{
|
||||
class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
|
||||
{
|
||||
protected override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
|
||||
LoadApplication(new App());
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var app = new Program();
|
||||
global::Xamarin.Forms.Platform.Tizen.Forms.Init(app);
|
||||
app.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,85 +17,85 @@ using Windows.UI.Xaml.Navigation;
|
|||
|
||||
namespace SkiaSharpSample.UWP
|
||||
{
|
||||
/// <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>
|
||||
/// 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)
|
||||
{
|
||||
/// <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)
|
||||
{
|
||||
|
||||
|
||||
Frame rootFrame = Window.Current.Content as Frame;
|
||||
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();
|
||||
// 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;
|
||||
rootFrame.NavigationFailed += OnNavigationFailed;
|
||||
|
||||
Xamarin.Forms.Forms.Init(e);
|
||||
Xamarin.Forms.Forms.Init(e);
|
||||
|
||||
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
|
||||
{
|
||||
//TODO: Load state from previously suspended application
|
||||
}
|
||||
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
|
||||
{
|
||||
//TODO: Load state from previously suspended application
|
||||
}
|
||||
|
||||
// Place the frame in the current Window
|
||||
Window.Current.Content = rootFrame;
|
||||
}
|
||||
// Place the frame in the current Window
|
||||
Window.Current.Content = rootFrame;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
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 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();
|
||||
}
|
||||
}
|
||||
/// <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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,13 +15,13 @@ using Windows.UI.Xaml.Navigation;
|
|||
|
||||
namespace SkiaSharpSample.UWP
|
||||
{
|
||||
public sealed partial class MainPage
|
||||
{
|
||||
public MainPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
public sealed partial class MainPage
|
||||
{
|
||||
public MainPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
LoadApplication(new SkiaSharpSample.App());
|
||||
}
|
||||
}
|
||||
LoadApplication(new SkiaSharpSample.App());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,25 +7,25 @@ using UIKit;
|
|||
|
||||
namespace SkiaSharpSample.iOS
|
||||
{
|
||||
// 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 partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
|
||||
{
|
||||
//
|
||||
// This method is invoked when the application has loaded and is ready to run. In this
|
||||
// method you should instantiate the window, load the UI into it and then make the window
|
||||
// visible.
|
||||
//
|
||||
// You have 17 seconds to return from this method, or iOS will terminate your application.
|
||||
//
|
||||
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
|
||||
{
|
||||
global::Xamarin.Forms.Forms.Init();
|
||||
LoadApplication(new App());
|
||||
// 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 partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
|
||||
{
|
||||
//
|
||||
// This method is invoked when the application has loaded and is ready to run. In this
|
||||
// method you should instantiate the window, load the UI into it and then make the window
|
||||
// visible.
|
||||
//
|
||||
// You have 17 seconds to return from this method, or iOS will terminate your application.
|
||||
//
|
||||
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
|
||||
{
|
||||
global::Xamarin.Forms.Forms.Init();
|
||||
LoadApplication(new App());
|
||||
|
||||
return base.FinishedLaunching(app, options);
|
||||
}
|
||||
}
|
||||
return base.FinishedLaunching(app, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,14 +7,14 @@ using UIKit;
|
|||
|
||||
namespace SkiaSharpSample.iOS
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
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,5 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
#if WINDOWS_UWP
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.Storage;
|
||||
|
@ -17,6 +18,9 @@ using Android.Content;
|
|||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
#elif TIZEN4_0
|
||||
using Tizen.Applications;
|
||||
using Xamarin.Forms.Platform.Tizen;
|
||||
#endif
|
||||
|
||||
namespace SkiaSharpSample
|
||||
|
@ -42,6 +46,8 @@ namespace SkiaSharpSample
|
|||
#elif __DESKTOP__
|
||||
var root = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
var path = Path.Combine(root, "Media", fontName);
|
||||
#elif TIZEN4_0
|
||||
var path = ResourcePath.GetPath(fontName);
|
||||
#endif
|
||||
|
||||
#if WINDOWS_UWP
|
||||
|
@ -53,6 +59,8 @@ namespace SkiaSharpSample
|
|||
var localStorage = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
|
||||
#elif __DESKTOP__
|
||||
var localStorage = System.Windows.Forms.Application.LocalUserAppDataPath;
|
||||
#elif TIZEN4_0
|
||||
var localStorage = Application.Current.DirectoryInfo.Data;
|
||||
#endif
|
||||
|
||||
SamplesManager.ContentFontPath = path;
|
||||
|
@ -114,6 +122,17 @@ namespace SkiaSharpSample
|
|||
Application.Context.StartActivity(intent);
|
||||
#elif __DESKTOP__
|
||||
Process.Start(path);
|
||||
#elif TIZEN4_0
|
||||
var appControl = new AppControl
|
||||
{
|
||||
Operation = AppControlOperations.View,
|
||||
Uri = "file://" + path
|
||||
};
|
||||
var matchedApplications = AppControl.GetMatchedApplicationIds(appControl);
|
||||
if (matchedApplications.Any())
|
||||
{
|
||||
AppControl.SendLaunchRequest(appControl);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,18 +109,25 @@
|
|||
<AndroidResource Include="Resources\drawable\splash.xml" />
|
||||
<AndroidResource Include="Resources\drawable\skia.png" />
|
||||
<AndroidResource Include="Resources\drawable\configure.png" />
|
||||
<AndroidResource Include="Resources\drawable\more.png" />
|
||||
<AndroidResource Include="Resources\drawable\slideshow.png" />
|
||||
<AndroidResource Include="Resources\drawable-hdpi\configure.png" />
|
||||
<AndroidResource Include="Resources\drawable-hdpi\more.png" />
|
||||
<AndroidResource Include="Resources\drawable-hdpi\slideshow.png" />
|
||||
<AndroidResource Include="Resources\drawable-ldpi\configure.png" />
|
||||
<AndroidResource Include="Resources\drawable-ldpi\more.png" />
|
||||
<AndroidResource Include="Resources\drawable-ldpi\slideshow.png" />
|
||||
<AndroidResource Include="Resources\drawable-mdpi\configure.png" />
|
||||
<AndroidResource Include="Resources\drawable-mdpi\more.png" />
|
||||
<AndroidResource Include="Resources\drawable-mdpi\slideshow.png" />
|
||||
<AndroidResource Include="Resources\drawable-xhdpi\configure.png" />
|
||||
<AndroidResource Include="Resources\drawable-xhdpi\more.png" />
|
||||
<AndroidResource Include="Resources\drawable-xhdpi\slideshow.png" />
|
||||
<AndroidResource Include="Resources\drawable-xxhdpi\configure.png" />
|
||||
<AndroidResource Include="Resources\drawable-xxhdpi\more.png" />
|
||||
<AndroidResource Include="Resources\drawable-xxhdpi\slideshow.png" />
|
||||
<AndroidResource Include="Resources\drawable-xxxhdpi\configure.png" />
|
||||
<AndroidResource Include="Resources\drawable-xxxhdpi\more.png" />
|
||||
<AndroidResource Include="Resources\drawable-xxxhdpi\slideshow.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\..\PlatformShared\PlatformShared.projitems" Label="Shared" />
|
||||
|
|
После Ширина: | Высота: | Размер: 474 B |
После Ширина: | Высота: | Размер: 370 B |
После Ширина: | Высота: | Размер: 355 B |
После Ширина: | Высота: | Размер: 616 B |
Двоичные данные
samples/Gallery/Xamarin.Forms/Android/Resources/drawable-xxhdpi/more.png
Normal file
После Ширина: | Высота: | Размер: 1.0 KiB |
Двоичные данные
samples/Gallery/Xamarin.Forms/Android/Resources/drawable-xxxhdpi/more.png
Normal file
После Ширина: | Высота: | Размер: 1.5 KiB |
После Ширина: | Высота: | Размер: 474 B |
|
@ -6,12 +6,18 @@
|
|||
<NavigationPage.ToolbarItems>
|
||||
<ToolbarItem Name="Configure Backend" Clicked="OnConfigureBackend">
|
||||
<ToolbarItem.Icon>
|
||||
<OnPlatform x:TypeArguments="FileImageSource" WinPhone="Assets/configure.png" iOS="configure.png" Android="configure.png" />
|
||||
<OnPlatform x:TypeArguments="FileImageSource">
|
||||
<On Platform="UWP" Value="Assets/configure.png" />
|
||||
<On Platform="iOS,Android,Tizen" Value="configure.png" />
|
||||
</OnPlatform>
|
||||
</ToolbarItem.Icon>
|
||||
</ToolbarItem>
|
||||
<ToolbarItem Name="Toggle Sample Slideshow" Clicked="OnPlaySamples">
|
||||
<ToolbarItem.Icon>
|
||||
<OnPlatform x:TypeArguments="FileImageSource" WinPhone="Assets/slideshow.png" iOS="slideshow.png" Android="slideshow.png" />
|
||||
<OnPlatform x:TypeArguments="FileImageSource">
|
||||
<On Platform="UWP" Value="Assets/slideshow.png" />
|
||||
<On Platform="iOS,Android,Tizen" Value="slideshow.png" />
|
||||
</OnPlatform>
|
||||
</ToolbarItem.Icon>
|
||||
</ToolbarItem>
|
||||
</NavigationPage.ToolbarItems>
|
||||
|
|
|
@ -12,6 +12,17 @@ namespace SkiaSharpSample
|
|||
: base(root)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (Device.RuntimePlatform == "Tizen")
|
||||
{
|
||||
ToolbarItems.Clear();
|
||||
var item = new ToolbarItem
|
||||
{
|
||||
Icon = "more.png"
|
||||
};
|
||||
item.Clicked += OnMore;
|
||||
ToolbarItems.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public SampleBase Sample
|
||||
|
@ -28,10 +39,24 @@ namespace SkiaSharpSample
|
|||
|
||||
public event EventHandler PlaySamples;
|
||||
|
||||
private async void OnMore(object sender, EventArgs e)
|
||||
{
|
||||
var result = await DisplayActionSheet("More", "Close", null, "Configure Backend", "Toggle Slideshow");
|
||||
switch (result)
|
||||
{
|
||||
case "Toggle Slideshow":
|
||||
OnPlaySamples(sender, e);
|
||||
break;
|
||||
case "Configure Backend":
|
||||
OnConfigureBackend(sender, e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnConfigureBackend(object sender, EventArgs e)
|
||||
{
|
||||
var items = Enum.GetNames(typeof(SampleBackends)).Except(new[] { nameof(SampleBackends.All) });
|
||||
var backendString = await DisplayActionSheet("Select Backend:", "Cancel", null, items.ToArray());
|
||||
var backendString = await DisplayActionSheet("Select Backend:", "Close", null, items.ToArray());
|
||||
|
||||
SampleBackends backend;
|
||||
if (Enum.TryParse(backendString, out backend))
|
||||
|
|
|
@ -25,6 +25,17 @@ namespace SkiaSharpSample
|
|||
};
|
||||
detailsPage.PlaySamples += delegate { masterPage.CycleSamples(); };
|
||||
|
||||
if (Device.RuntimePlatform == "Tizen")
|
||||
{
|
||||
var hamburger = new ToolbarItem
|
||||
{
|
||||
Icon = "hamburger.png",
|
||||
Order = ToolbarItemOrder.Secondary
|
||||
};
|
||||
hamburger.Clicked += delegate { IsPresented = !IsPresented; };
|
||||
detailsPage.ToolbarItems.Add(hamburger);
|
||||
}
|
||||
|
||||
Master = masterPage;
|
||||
Detail = detailsPage;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
x:Class="SkiaSharpSample.MasterPage"
|
||||
Title="SkiaSharp" BackgroundColor="#EEEEEE">
|
||||
<ContentPage.Icon>
|
||||
<OnPlatform x:TypeArguments="FileImageSource" iOS="hamburger.png" />
|
||||
<OnPlatform x:TypeArguments="FileImageSource">
|
||||
<On Platform="iOS" Value="hamburger.png" />
|
||||
</OnPlatform>
|
||||
</ContentPage.Icon>
|
||||
<StackLayout Padding="0" Spacing="0">
|
||||
<ContentView BackgroundColor="#2c3e50" Margin="0">
|
||||
|
|
|
@ -109,6 +109,9 @@
|
|||
<BundleResource Include="Resources\configure.png" />
|
||||
<BundleResource Include="Resources\configure%402x.png" />
|
||||
<BundleResource Include="Resources\configure%403x.png" />
|
||||
<BundleResource Include="Resources\more.png" />
|
||||
<BundleResource Include="Resources\more%402x.png" />
|
||||
<BundleResource Include="Resources\more%403x.png" />
|
||||
<BundleResource Include="Resources\hamburger.png" />
|
||||
<BundleResource Include="Resources\hamburger%402x.png" />
|
||||
<BundleResource Include="Resources\hamburger%403x.png" />
|
||||
|
|
После Ширина: | Высота: | Размер: 256 B |
После Ширина: | Высота: | Размер: 370 B |
После Ширина: | Высота: | Размер: 687 B |
|
@ -75,7 +75,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mac", "Mac\Mac.csproj", "{9
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWP", "UWP\UWP.csproj", "{99F08DB7-A06E-4814-BDD6-BB87DBE278AF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharpGallery.Tizen", "Tizen\SkiaSharpGallery.Tizen.csproj", "{A41BC5F6-3879-4708-816D-52DDF5B8F003}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TizenOS", "Tizen\TizenOS.csproj", "{A41BC5F6-3879-4708-816D-52DDF5B8F003}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HarfBuzzSharp.Tizen", "..\..\..\binding\HarfBuzzSharp.Tizen\HarfBuzzSharp.Tizen.csproj", "{D5495F6D-5654-4E83-8368-519AD142E7D9}"
|
||||
EndProject
|
||||
|
|
50
samples/Gallery/Xamarin.Forms/Tizen/SkiaSharpGallery.Tizen.cs → samples/Gallery/Xamarin.Forms/Tizen/Program.cs
Executable file → Normal file
|
@ -1,25 +1,25 @@
|
|||
using Xamarin.Forms.Platform.Tizen;
|
||||
|
||||
namespace SkiaSharpSample.Platform
|
||||
{
|
||||
class Program : FormsApplication
|
||||
{
|
||||
protected override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
|
||||
SamplesInitializer.Init();
|
||||
|
||||
LoadApplication(new App());
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var app = new Program();
|
||||
|
||||
Forms.Init(app);
|
||||
|
||||
app.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
using Xamarin.Forms.Platform.Tizen;
|
||||
|
||||
namespace SkiaSharpSample.Platform
|
||||
{
|
||||
public class Program : FormsApplication
|
||||
{
|
||||
protected override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
|
||||
SamplesInitializer.Init();
|
||||
|
||||
LoadApplication(new App());
|
||||
}
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var app = new Program();
|
||||
|
||||
Forms.Init(app);
|
||||
|
||||
app.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>tizen40</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>SkiaSharpSample.Platform</RootNamespace>
|
||||
<AssemblyName>SkiaSharpGallery.Tizen</AssemblyName>
|
||||
<AssemblyName>TizenOS</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
После Ширина: | Высота: | Размер: 901 B |
После Ширина: | Высота: | Размер: 174 B |
После Ширина: | Высота: | Размер: 355 B |
После Ширина: | Высота: | Размер: 954 B |
До Ширина: | Высота: | Размер: 9.9 KiB |
После Ширина: | Высота: | Размер: 5.7 KiB |
|
@ -1,10 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="org.tizen.example.SkiaSharpGallery.Tizen" version="1.0.0" api-version="4" xmlns="http://tizen.org/ns/packages">
|
||||
<manifest package="org.tizen.example.TizenOS" version="1.0.0" api-version="4" xmlns="http://tizen.org/ns/packages">
|
||||
<profile name="common" />
|
||||
<ui-application appid="org.tizen.example.SkiaSharpGallery.Tizen" exec="SkiaSharpGallery.Tizen.dll" multiple="false" nodisplay="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
|
||||
<label>SkiaSharpGallery.Tizen</label>
|
||||
<icon>SkiaSharpGallery.Tizen.png</icon>
|
||||
<ui-application appid="org.tizen.example.TizenOS" exec="TizenOS.dll" multiple="false" nodisplay="false" taskmanage="true" splash-screen-display="true" type="dotnet" launch_mode="single">
|
||||
<label>SkiaSharp for Xamarin.Forms</label>
|
||||
<icon>TizenOS.png</icon>
|
||||
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
|
||||
</ui-application>
|
||||
<privileges>
|
||||
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
|
||||
</privileges>
|
||||
<provides-appdefined-privileges />
|
||||
</manifest>
|
||||
|
|
|
@ -41,10 +41,10 @@ namespace SkiaSharpSample.Platform
|
|||
{
|
||||
|
||||
#if DEBUG
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
this.DebugSettings.EnableFrameRateCounter = true;
|
||||
}
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
this.DebugSettings.EnableFrameRateCounter = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
Frame rootFrame = Window.Current.Content as Frame;
|
||||
|
|
После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -151,6 +151,7 @@
|
|||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\configure.png" />
|
||||
<Content Include="Assets\more.png" />
|
||||
<Content Include="Assets\slideshow.png" />
|
||||
<Content Include="Package.StoreAssociation.xml" />
|
||||
<Content Include="Properties\Default.rd.xml" />
|
||||
|
|
После Ширина: | Высота: | Размер: 256 B |
После Ширина: | Высота: | Размер: 370 B |
После Ширина: | Высота: | Размер: 687 B |
|
@ -157,6 +157,9 @@
|
|||
<BundleResource Include="Resources\configure.png" />
|
||||
<BundleResource Include="Resources\configure%402x.png" />
|
||||
<BundleResource Include="Resources\configure%403x.png" />
|
||||
<BundleResource Include="Resources\more.png" />
|
||||
<BundleResource Include="Resources\more%402x.png" />
|
||||
<BundleResource Include="Resources\more%403x.png" />
|
||||
<BundleResource Include="Resources\ic_launcher.png" />
|
||||
<None Include="Entitlements.plist" />
|
||||
<None Include="Info.plist" />
|
||||
|
|