This commit is contained in:
Matthew Leibowitz 2018-02-05 17:36:27 +02:00
Родитель e8fc6869c6 88aa6ab08d
Коммит e6b7ee5ed9
592 изменённых файлов: 8171 добавлений и 883 удалений

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

@ -110,8 +110,6 @@ namespace SkiaSharp
Expanded = 7,
ExtraExpanded = 8,
UltraExpanded = 9,
[Obsolete("Use UltraExpanded instead.", true)]
UltaExpanded = UltraExpanded
};
public enum SKFontStyleSlant {
@ -162,12 +160,6 @@ namespace SkiaSharp
RgbaF16
}
[Obsolete ("May be removed in the next version.", true)]
public enum SKColorProfileType {
Linear,
SRGB
}
public enum SKAlphaType {
Unknown,
Opaque,
@ -191,39 +183,6 @@ namespace SkiaSharp
All = IgnoreTransform | HighQuality,
}
[Obsolete ("Use SKBlendMode instead.", true)]
public enum SKXferMode {
Clear,
Src,
Dst,
SrcOver,
DstOver,
SrcIn,
DstIn,
SrcOut,
DstOut,
SrcATop,
DstATop,
Xor,
Plus,
Modulate,
Screen,
Overlay,
Darken,
Lighten,
ColorDodge,
ColorBurn,
HardLight,
SoftLight,
Difference,
Exclusion,
Multiply,
Hue,
Saturation,
Color,
Luminosity,
}
public enum SKBlendMode {
Clear,
Src,
@ -256,11 +215,6 @@ namespace SkiaSharp
Luminosity,
}
[Obsolete ("Use SKClipOperation instead.", true)]
public enum SKClipType {
Intersect, Difference
}
public enum SKPixelGeometry {
Unknown,
RgbHorizontal,
@ -315,8 +269,6 @@ namespace SkiaSharp
public enum SKStrokeJoin {
Miter, Round, Bevel,
[Obsolete ("Use SKStrokeJoin.Miter instead.", true)]
Mitter = Miter,
}
public enum SKTextAlign {
@ -2039,12 +1991,6 @@ namespace SkiaSharp
}
}
[Obsolete ("Use GRContext.Flush() instead.", true)]
public enum GRContextFlushBits {
None = 0,
Discard = 0x2,
}
public enum SKPathOp {
Difference,
Intersect,

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

@ -98,12 +98,6 @@ namespace SkiaSharp
SkiaApi.gr_context_flush (Handle);
}
[Obsolete ("Use Flush() instead.", true)]
public void Flush (GRContextFlushBits flagsBitfield)
{
Flush ();
}
public int GetRecommendedSampleCount (GRPixelConfig config, float dpi)
{
return SkiaApi.gr_context_get_recommended_sample_count (Handle, config, dpi);

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

@ -43,12 +43,6 @@ namespace SkiaSharp
return CreateNativeAngleInterface () ?? CreateNativeGlInterface ();
}
[Obsolete ("Use CreateNativeGlInterface() or CreateDefaultInterface() instead.", true)]
public static GRGlInterface CreateNativeInterface ()
{
return CreateNativeGlInterface ();
}
public static GRGlInterface CreateNativeGlInterface ()
{
// the native code will automatically return null on non-OpenGL platforms, such as UWP

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

@ -150,22 +150,6 @@ namespace SkiaSharp
SkiaApi.sk_bitmap_set_pixel_color (Handle, x, y, color);
}
[Obsolete ("Use SKPixmap.ReadPixels instead.")]
public bool CopyPixelsTo(IntPtr dst, int dstSize, int dstRowBytes = 0, bool preserveDstPad = false)
{
if (dst == IntPtr.Zero) {
throw new ArgumentException (nameof (dst));
}
using (var pixmap = PeekPixels ()) {
var info = Info;
if (dstRowBytes == 0) {
dstRowBytes = info.RowBytes;
}
return pixmap.ReadPixels (info, dst, dstRowBytes);
}
}
public bool CanCopyTo (SKColorType colorType)
{
var srcCT = ColorType;
@ -368,16 +352,6 @@ namespace SkiaSharp
get { return (int)SkiaApi.sk_bitmap_get_byte_count (Handle); }
}
[Obsolete ("This no longer does anything, and should not be used.")]
public void LockPixels ()
{
}
[Obsolete ("This no longer does anything, and should not be used.")]
public void UnlockPixels ()
{
}
public IntPtr GetPixels ()
{
IntPtr length;
@ -484,7 +458,9 @@ namespace SkiaSharp
if (filename == null) {
throw new ArgumentNullException (nameof (filename));
}
return DecodeBounds (new SKFileStream (filename));
using (var stream = OpenStream (filename)) {
return DecodeBounds (stream);
}
}
public static SKImageInfo DecodeBounds (byte[] buffer)
@ -492,7 +468,9 @@ namespace SkiaSharp
if (buffer == null) {
throw new ArgumentNullException (nameof (buffer));
}
return DecodeBounds (new SKMemoryStream (buffer));
using (var stream = new SKMemoryStream (buffer)) {
return DecodeBounds (stream);
}
}
public static SKBitmap Decode (SKCodec codec, SKImageInfo bitmapInfo)
@ -607,7 +585,9 @@ namespace SkiaSharp
if (filename == null) {
throw new ArgumentNullException (nameof (filename));
}
return Decode (new SKFileStream (filename));
using (var stream = OpenStream (filename)) {
return Decode (stream);
}
}
public static SKBitmap Decode (string filename, SKImageInfo bitmapInfo)
@ -615,7 +595,9 @@ namespace SkiaSharp
if (filename == null) {
throw new ArgumentNullException (nameof (filename));
}
return Decode (new SKFileStream (filename), bitmapInfo);
using (var stream = OpenStream (filename)) {
return Decode (stream, bitmapInfo);
}
}
public static SKBitmap Decode (byte[] buffer)
@ -623,7 +605,9 @@ namespace SkiaSharp
if (buffer == null) {
throw new ArgumentNullException (nameof (buffer));
}
return Decode (new SKMemoryStream (buffer));
using (var stream = new SKMemoryStream (buffer)) {
return Decode(stream);
}
}
public static SKBitmap Decode (byte[] buffer, SKImageInfo bitmapInfo)
@ -631,7 +615,9 @@ namespace SkiaSharp
if (buffer == null) {
throw new ArgumentNullException (nameof (buffer));
}
return Decode (new SKMemoryStream (buffer), bitmapInfo);
using (var stream = new SKMemoryStream (buffer)) {
return Decode (stream, bitmapInfo);
}
}
public bool InstallPixels (SKImageInfo info, IntPtr pixels)
@ -758,6 +744,15 @@ namespace SkiaSharp
}
}
private static SKStream OpenStream (string path)
{
if (!SKFileStream.IsPathSupported (path)) {
// due to a bug (https://github.com/mono/SkiaSharp/issues/390)
return WrapManagedStream (File.OpenRead (path));
} else {
return new SKFileStream (path);
}
}
// internal proxy
#if __IOS__
@ -770,28 +765,4 @@ namespace SkiaSharp
}
}
}
[Obsolete ("This no longer does anything, and should not be used.")]
public class SKAutoLockPixels : IDisposable
{
[Obsolete ("This no longer does anything, and should not be used.")]
public SKAutoLockPixels (SKBitmap bitmap)
{
}
[Obsolete ("This no longer does anything, and should not be used.")]
public SKAutoLockPixels (SKBitmap bitmap, bool doLock)
{
}
[Obsolete ("This no longer does anything, and should not be used.")]
public void Dispose ()
{
}
[Obsolete ("This no longer does anything, and should not be used.")]
public void Unlock ()
{
}
}
}

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

@ -75,12 +75,6 @@ namespace SkiaSharp
return SkiaApi.sk_canvas_save_layer (Handle, IntPtr.Zero, paint == null ? IntPtr.Zero : paint.Handle);
}
[Obsolete ("Use DrawColor(SKColor, SKBlendMode) instead.", true)]
public void DrawColor (SKColor color, SKXferMode mode)
{
DrawColor (color, (SKBlendMode)(int)mode);
}
public void DrawColor (SKColor color, SKBlendMode mode = SKBlendMode.Src)
{
SkiaApi.sk_canvas_draw_color (Handle, color, mode);
@ -189,23 +183,11 @@ namespace SkiaSharp
SkiaApi.sk_canvas_concat (Handle, ref m);
}
[Obsolete ("Use ClipRect(SKRect, SKClipOperation, bool) instead.", true)]
public void ClipRect (SKRect rect, SKRegionOperation operation, bool antialias = false)
{
ClipRect (rect, (SKClipOperation)(int)operation, antialias);
}
public void ClipRect (SKRect rect, SKClipOperation operation = SKClipOperation.Intersect, bool antialias = false)
{
SkiaApi.sk_canvas_clip_rect_with_operation (Handle, ref rect, operation, antialias);
}
[Obsolete ("Use ClipPath(SKPath, SKClipOperation, bool) instead.", true)]
public void ClipPath (SKPath path, SKRegionOperation operation, bool antialias = false)
{
ClipPath (path, (SKClipOperation)(int)operation, antialias);
}
public void ClipPath (SKPath path, SKClipOperation operation = SKClipOperation.Intersect, bool antialias = false)
{
if (path == null)
@ -222,12 +204,6 @@ namespace SkiaSharp
SkiaApi.sk_canvas_clip_region (Handle, region.Handle, operation);
}
[Obsolete ("Use LocalClipBounds instead.")]
public SKRect ClipBounds => LocalClipBounds;
[Obsolete ("Use DeviceClipBounds instead.")]
public SKRectI ClipDeviceBounds => DeviceClipBounds;
public SKRect LocalClipBounds {
get {
SKRect bounds;
@ -244,18 +220,6 @@ namespace SkiaSharp
}
}
[Obsolete ("Use GetLocalClipBounds instead.")]
public bool GetClipBounds (ref SKRect bounds)
{
return GetLocalClipBounds (out bounds);
}
[Obsolete ("Use GetDeviceClipBounds instead.")]
public bool GetClipDeviceBounds (ref SKRectI bounds)
{
return GetDeviceClipBounds (out bounds);
}
public bool GetLocalClipBounds (out SKRect bounds)
{
return SkiaApi.sk_canvas_get_local_clip_bounds (Handle, out bounds);
@ -503,12 +467,6 @@ namespace SkiaSharp
SkiaApi.sk_canvas_draw_text (Handle, text, text.Length, x, y, paint.Handle);
}
[Obsolete ("Use DrawPositionedText instead.", true)]
public void DrawText (string text, SKPoint [] points, SKPaint paint)
{
DrawPositionedText (text, points, paint);
}
public void DrawPositionedText (string text, SKPoint [] points, SKPaint paint)
{
if (text == null)
@ -534,12 +492,6 @@ namespace SkiaSharp
SkiaApi.sk_canvas_draw_pos_text (Handle, text, text.Length, points, paint.Handle);
}
[Obsolete ("Use DrawTextOnPath instead.", true)]
public void DrawText (IntPtr buffer, int length, SKPath path, float hOffset, float vOffset, SKPaint paint)
{
DrawTextOnPath (buffer, length, path, hOffset, vOffset, paint);
}
public void DrawTextOnPath (IntPtr buffer, int length, SKPath path, SKPoint offset, SKPaint paint)
{
DrawTextOnPath (buffer, length, path, offset.X, offset.Y, paint);
@ -572,12 +524,6 @@ namespace SkiaSharp
SkiaApi.sk_canvas_draw_text (Handle, buffer, length, x, y, paint.Handle);
}
[Obsolete ("Use DrawPositionedText instead.", true)]
public void DrawText (IntPtr buffer, int length, SKPoint[] points, SKPaint paint)
{
DrawPositionedText (buffer, length, points, paint);
}
public void DrawPositionedText (IntPtr buffer, int length, SKPoint[] points, SKPaint paint)
{
if (buffer == IntPtr.Zero)
@ -590,12 +536,6 @@ namespace SkiaSharp
SkiaApi.sk_canvas_draw_pos_text (Handle, buffer, length, points, paint.Handle);
}
[Obsolete ("Use DrawTextOnPath instead.", true)]
public void DrawText (string text, SKPath path, float hOffset, float vOffset, SKPaint paint)
{
DrawTextOnPath (text, path, hOffset, vOffset, paint);
}
public void DrawTextOnPath (string text, SKPath path, SKPoint offset, SKPaint paint)
{
DrawTextOnPath (text, path, offset.X, offset.Y, paint);
@ -614,12 +554,6 @@ namespace SkiaSharp
DrawTextOnPath (bytes, path, hOffset, vOffset, paint);
}
[Obsolete ("Use DrawTextOnPath instead.", true)]
public void DrawText (byte[] text, SKPath path, float hOffset, float vOffset, SKPaint paint)
{
DrawTextOnPath (text, path, hOffset, vOffset, paint);
}
public void DrawTextOnPath (byte[] text, SKPath path, SKPoint offset, SKPaint paint)
{
DrawTextOnPath (text, path, offset.X, offset.Y, paint);

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

@ -32,18 +32,6 @@ namespace SkiaSharp
base.Dispose(disposing);
}
[Obsolete("Use CreateBlendMode(SKColor, SKBlendMode) instead.", true)]
public static SKColorFilter CreateXferMode(SKColor c, SKXferMode mode)
{
return GetObject<SKColorFilter>(SkiaApi.sk_colorfilter_new_mode(c, (SKBlendMode)mode));
}
[Obsolete("Use CreateBlendMode(SKColor, SKBlendMode) instead.", true)]
public static SKColorFilter CreateBlendMode(SKColor c, SKXferMode mode)
{
return GetObject<SKColorFilter>(SkiaApi.sk_colorfilter_new_mode(c, (SKBlendMode)mode));
}
public static SKColorFilter CreateBlendMode(SKColor c, SKBlendMode mode)
{
return GetObject<SKColorFilter>(SkiaApi.sk_colorfilter_new_mode(c, mode));

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

@ -244,17 +244,5 @@ namespace SkiaSharp
}
return xyzD50;
}
[Obsolete ("Use SKColorSpacePrimaries.ToXyzD50(SKMatrix44) instead.")]
public static bool ConvertPrimariesToXyzD50 (SKColorSpacePrimaries primaries, SKMatrix44 toXyzD50)
{
return primaries.ToXyzD50(toXyzD50);
}
[Obsolete ("Use SKColorSpacePrimaries.ToXyzD50 instead.")]
public static SKMatrix44 ConvertPrimariesToXyzD50 (SKColorSpacePrimaries primaries)
{
return primaries.ToXyzD50();
}
}
}

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

@ -54,42 +54,6 @@ namespace SkiaSharp
{
}
[Obsolete ("Use SKData.Empty instead.", true)]
public SKData ()
: this (SkiaApi.sk_data_new_empty (), true)
{
if (Handle == IntPtr.Zero) {
throw new InvalidOperationException ("Unable to create a new SKData instance.");
}
}
[Obsolete ("Use SKData.CreateCopy(IntPtr, ulong) instead.", true)]
public SKData (IntPtr bytes, ulong length)
: this (IntPtr.Zero, true)
{
if (SizeOf <IntPtr> () == 4 && length > UInt32.MaxValue)
throw new ArgumentOutOfRangeException (nameof (length), "The length exceeds the size of pointers.");
Handle = SkiaApi.sk_data_new_with_copy (bytes, (IntPtr) length);
if (Handle == IntPtr.Zero) {
throw new InvalidOperationException ("Unable to copy the SKData instance.");
}
}
[Obsolete ("Use SKData.CreateCopy(byte[]) instead.", true)]
public SKData (byte[] bytes)
: this (bytes, (ulong) bytes.Length)
{
}
[Obsolete ("Use SKData.CreateCopy(byte[], ulong) instead.", true)]
public SKData (byte[] bytes, ulong length)
: this (SkiaApi.sk_data_new_with_copy (bytes, (IntPtr) length), true)
{
if (Handle == IntPtr.Zero) {
throw new InvalidOperationException ("Unable to copy the SKData instance.");
}
}
public static SKData Empty => empty.Value;
public static SKData CreateCopy (IntPtr bytes, ulong length)
@ -127,7 +91,13 @@ namespace SkiaSharp
if (string.IsNullOrEmpty (filename))
throw new ArgumentException ("The filename cannot be empty.", nameof (filename));
return GetObject<SKData> (SkiaApi.sk_data_new_from_file (filename));
using (var stream = SKFileStream.OpenStream (filename)) {
if (stream == null) {
return null;
} else {
return Create (stream);
}
}
}
public static SKData Create (Stream stream)
@ -216,15 +186,6 @@ namespace SkiaSharp
}
}
[Obsolete ("Not supported.", true)]
[EditorBrowsable (EditorBrowsableState.Never)]
public static SKData FromMallocMemory (IntPtr bytes, ulong length)
{
if (SizeOf <IntPtr> () == 4 && length > UInt32.MaxValue)
throw new ArgumentOutOfRangeException (nameof (length), "The length exceeds the size of pointers.");
return GetObject<SKData> (SkiaApi.sk_data_new_from_malloc (bytes, (IntPtr) length));
}
internal static SKData FromCString (string str)
{
var bytes = Encoding.ASCII.GetBytes (str ?? string.Empty);

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

@ -54,11 +54,16 @@ namespace SkiaSharp
SkiaApi.sk_document_close (Handle);
}
[Obsolete ("Use CreateXps(SKWStream, float) instead.")]
public static SKDocument CreateXps (string path, float dpi = DefaultRasterDpi)
{
var stream = new SKFileWStream (path);
if (path == null) {
throw new ArgumentNullException (nameof (path));
}
var stream = SKFileWStream.OpenStream (path);
var doc = CreateXps (stream, dpi);
stream.RevokeOwnership ();
doc.SetDisposeChild (stream);
return doc;
}
@ -71,9 +76,17 @@ namespace SkiaSharp
return GetObject<SKDocument> (SkiaApi.sk_document_create_xps_from_stream (stream.Handle, dpi));
}
[Obsolete ("Use CreatePdf(SKWStream, float) instead.")]
public static SKDocument CreatePdf (string path, float dpi = DefaultRasterDpi)
{
return GetObject<SKDocument> (SkiaApi.sk_document_create_pdf_from_filename (path, dpi));
if (path == null) {
throw new ArgumentNullException (nameof (path));
}
var stream = SKFileWStream.OpenStream (path);
var doc = CreatePdf (stream, dpi);
doc.SetDisposeChild (stream);
return doc;
}
public static SKDocument CreatePdf (SKWStream stream, float dpi = DefaultRasterDpi)

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

@ -11,19 +11,6 @@ using System.Runtime.InteropServices;
namespace SkiaSharp
{
[Obsolete ("Use SKEncodedImageFormat instead.", true)]
public enum SKImageEncodeFormat {
Unknown,
Bmp,
Gif,
Ico,
Jpeg,
Png,
Wbmp,
Webp,
Ktx,
}
// public delegates
public delegate void SKImageRasterReleaseDelegate (IntPtr pixels, object context);
public delegate void SKImageTextureReleaseDelegate (object context);
@ -182,18 +169,6 @@ namespace SkiaSharp
return GetObject<SKImage> (handle);
}
[Obsolete ("Use FromEncodedData instead.", true)]
public static SKImage FromData (SKData data, SKRectI subset)
{
return FromEncodedData (data, subset);
}
[Obsolete ("Use FromEncodedData instead.", true)]
public static SKImage FromData (SKData data)
{
return FromEncodedData (data);
}
public static SKImage FromBitmap (SKBitmap bitmap)
{
if (bitmap == null)
@ -340,43 +315,6 @@ namespace SkiaSharp
return GetObject<SKData> (SkiaApi.sk_image_encode_with_serializer (Handle, serializer.Handle));
}
[Obsolete ("Use Encode(SKEncodedImageFormat, int) instead.", true)]
public SKData Encode (SKImageEncodeFormat format, int quality)
{
SKEncodedImageFormat newFormat;
switch (format) {
case SKImageEncodeFormat.Bmp:
newFormat = SKEncodedImageFormat.Bmp;
break;
case SKImageEncodeFormat.Gif:
newFormat = SKEncodedImageFormat.Gif;
break;
case SKImageEncodeFormat.Ico:
newFormat = SKEncodedImageFormat.Ico;
break;
case SKImageEncodeFormat.Jpeg:
newFormat = SKEncodedImageFormat.Jpeg;
break;
case SKImageEncodeFormat.Png:
newFormat = SKEncodedImageFormat.Png;
break;
case SKImageEncodeFormat.Wbmp:
newFormat = SKEncodedImageFormat.Wbmp;
break;
case SKImageEncodeFormat.Webp:
newFormat = SKEncodedImageFormat.Webp;
break;
case SKImageEncodeFormat.Ktx:
newFormat = SKEncodedImageFormat.Ktx;
break;
case SKImageEncodeFormat.Unknown:
default:
newFormat = SKEncodedImageFormat.Png;
break;
}
return Encode (newFormat, quality);
}
public SKData Encode (SKEncodedImageFormat format, int quality)
{
return GetObject<SKData> (SkiaApi.sk_image_encode_specific (Handle, format, quality));

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

@ -64,12 +64,6 @@ namespace SkiaSharp
return GetObject<SKImageFilter>(SkiaApi.sk_imagefilter_new_compose(outer.Handle, inner.Handle));
}
[Obsolete("Use CreateDisplacementMapEffect instead.", true)]
public static SKImageFilter CreateCompose(SKDisplacementMapEffectChannelSelectorType xChannelSelector, SKDisplacementMapEffectChannelSelectorType yChannelSelector, float scale, SKImageFilter displacement, SKImageFilter input = null, SKImageFilter.CropRect cropRect = null)
{
return CreateDisplacementMapEffect(xChannelSelector, yChannelSelector, scale, displacement, input, cropRect);
}
public static SKImageFilter CreateDisplacementMapEffect(SKDisplacementMapEffectChannelSelectorType xChannelSelector, SKDisplacementMapEffectChannelSelectorType yChannelSelector, float scale, SKImageFilter displacement, SKImageFilter input = null, SKImageFilter.CropRect cropRect = null)
{
if (displacement == null)

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

@ -456,12 +456,6 @@ typeMask = Mask.Scale | Mask.RectStaysRect
return res;
}
[Obsolete ("Use MapPoint instead.", true)]
public SKPoint MapXY (float x, float y)
{
return MapPoint (x, y);
}
public SKPoint MapPoint (SKPoint point)
{
return MapPoint (point.X, point.Y);

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

@ -166,16 +166,24 @@ namespace SkiaSharp
return false;
}
/// <summary>
/// This object will dispose the specific child object which disposed.
/// </summary>
/// <param name="child">The child object to dispose when the parent is disposed.</param>
internal void SetDisposeChild (SKObject child)
{
lock (ownedObjects) {
ownedObjects.Add (child);
}
}
/// <summary>
/// This object will take ownership of the specified object.
/// </summary>
/// <param name="obj">The object to own.</param>
private void TakeOwnership(SKObject obj)
private void TakeOwnership (SKObject obj)
{
lock (ownedObjects)
{
ownedObjects.Add(obj);
}
SetDisposeChild (obj);
obj.RevokeOwnership ();
}
@ -183,7 +191,7 @@ namespace SkiaSharp
/// This object will hand ownership over to the specified object.
/// </summary>
/// <param name="owner">The object to give ownership to.</param>
internal void RevokeOwnership(SKObject owner = null)
internal void RevokeOwnership (SKObject owner = null)
{
if (owner != null) {
owner.TakeOwnership (this);

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

@ -233,16 +233,6 @@ namespace SkiaSharp
}
}
[Obsolete ("Use BlendMode instead.", true)]
public SKXferMode XferMode {
get {
return (SKXferMode)BlendMode;
}
set {
BlendMode = (SKBlendMode)value;
}
}
public SKBlendMode BlendMode {
get {
return SkiaApi.sk_paint_get_blendmode(Handle);

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

@ -29,25 +29,6 @@ namespace SkiaSharp
public class SKPath : SKObject
{
[Obsolete ("Use SKPathVerb instead.", true)]
public enum Verb
{
Move = SKPathVerb.Move,
Line = SKPathVerb.Line,
Quad = SKPathVerb.Quad,
Conic = SKPathVerb.Conic,
Cubic = SKPathVerb.Cubic,
Close = SKPathVerb.Close,
Done = SKPathVerb.Done
}
[Obsolete ("Use SKPathAddMode instead.", true)]
public enum AddMode
{
Append = SKPathAddMode.Append,
Extend = SKPathAddMode.Extend
}
[Preserve]
internal SKPath (IntPtr handle, bool owns)
: base (handle, owns)
@ -387,12 +368,6 @@ namespace SkiaSharp
SkiaApi.sk_path_transform (Handle, ref matrix);
}
[Obsolete ("Use AddPath(SKPath, float, float, SKPathAddMode) instead.", true)]
public void AddPath (SKPath other, float dx, float dy, SKPath.AddMode mode)
{
AddPath (other, dx, dy, (SKPathAddMode)mode);
}
public void AddPath (SKPath other, float dx, float dy, SKPathAddMode mode = SKPathAddMode.Append)
{
if (other == null)
@ -401,12 +376,6 @@ namespace SkiaSharp
SkiaApi.sk_path_add_path_offset (Handle, other.Handle, dx, dy, mode);
}
[Obsolete ("Use AddPath(SKPath, ref SKMatrix, SKPathAddMode) instead.", true)]
public void AddPath (SKPath other, ref SKMatrix matrix, AddMode mode)
{
AddPath (other, ref matrix, (SKPathAddMode)mode);
}
public void AddPath (SKPath other, ref SKMatrix matrix, SKPathAddMode mode = SKPathAddMode.Append)
{
if (other == null)
@ -415,12 +384,6 @@ namespace SkiaSharp
SkiaApi.sk_path_add_path_matrix (Handle, other.Handle, ref matrix, mode);
}
[Obsolete ("Use AddPath(SKPath, SKPathAddMode) instead.", true)]
public void AddPath (SKPath other, AddMode mode)
{
AddPath (other, (SKPathAddMode)mode);
}
public void AddPath (SKPath other, SKPathAddMode mode = SKPathAddMode.Append)
{
if (other == null)

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

@ -10,14 +10,6 @@ using System;
namespace SkiaSharp
{
[Obsolete("Use SKPath1DPathEffectStyle instead.", true)]
public enum SkPath1DPathEffectStyle
{
Translate,
Rotate,
Morph,
}
public enum SKPath1DPathEffectStyle
{
Translate,
@ -82,12 +74,6 @@ namespace SkiaSharp
return GetObject<SKPathEffect>(SkiaApi.sk_path_effect_create_1d_path(path.Handle, advance, phase, style));
}
[Obsolete("Use Create1DPath(SKPath, float, float, SKPath1DPathEffectStyle) instead.", true)]
public static SKPathEffect Create1DPath(SKPath path, float advance, float phase, SkPath1DPathEffectStyle style)
{
return Create1DPath(path, advance, phase, (SKPath1DPathEffectStyle)style);
}
public static SKPathEffect Create2DLine(float width, SKMatrix matrix)
{
return GetObject<SKPathEffect>(SkiaApi.sk_path_effect_create_2d_line(width, ref matrix));

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

@ -20,15 +20,6 @@ namespace SkiaSharp
public class SKPathMeasure : SKObject
{
[Flags]
[Obsolete ("Use SKPathMeasureMatrixFlags instead.", true)]
public enum MatrixFlags
{
GetPosition = SKPathMeasureMatrixFlags.GetPosition,
GetTangent = SKPathMeasureMatrixFlags.GetTangent,
GetPositionAndTangent = SKPathMeasureMatrixFlags.GetPositionAndTangent,
}
[Preserve]
internal SKPathMeasure (IntPtr handle, bool owns)
: base (handle, owns)
@ -92,12 +83,6 @@ namespace SkiaSharp
return SkiaApi.sk_pathmeasure_get_pos_tan (Handle, distance, IntPtr.Zero, out tangent);
}
[Obsolete ("Use GetMatrix(float, out SKMatrix, SKPathMeasureMatrixFlags) instead.", true)]
public bool GetMatrix (float distance, out SKMatrix matrix, MatrixFlags flags)
{
return GetMatrix (distance, out matrix, (SKPathMeasureMatrixFlags)flags);
}
public bool GetMatrix (float distance, out SKMatrix matrix, SKPathMeasureMatrixFlags flags)
{
return SkiaApi.sk_pathmeasure_get_matrix (Handle, distance, out matrix, flags);

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

@ -30,9 +30,6 @@ namespace SkiaSharp
public uint UniqueId => SkiaApi.sk_picture_get_unique_id (Handle);
[Obsolete("Use CullRect instead.", true)]
public SKRect Bounds => CullRect;
public SKRect CullRect {
get {
SKRect rect;

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

@ -200,12 +200,6 @@ namespace SkiaSharp
return GetObject<SKShader> (SkiaApi.sk_shader_new_compose (shaderA.Handle, shaderB.Handle));
}
[Obsolete ("Use CreateCompose(SKShader, SKShader, SKBlendMode) instead.", true)]
public static SKShader CreateCompose (SKShader shaderA, SKShader shaderB, SKXferMode mode)
{
return CreateCompose (shaderA, shaderA, (SKBlendMode)mode);
}
public static SKShader CreateCompose (SKShader shaderA, SKShader shaderB, SKBlendMode mode)
{
if (shaderA == null)

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

@ -200,6 +200,31 @@ namespace SkiaSharp
base.Dispose (disposing);
}
public static bool IsPathSupported (string path)
{
// due to a bug (https://github.com/mono/SkiaSharp/issues/390)
if (PlatformConfiguration.IsWindows) {
for (int i = 0; i < path.Length; i++) {
if (path [i] >= byte.MaxValue)
return false;
}
}
return true;
}
public static SKStreamAsset OpenStream (string path)
{
if (!File.Exists (path)) {
return null;
}
if (!IsPathSupported (path)) {
return new SKManagedStream (File.OpenRead (path), true);
} else {
return new SKFileStream (path);
}
}
}
public class SKMemoryStream : SKStreamMemory
@ -399,6 +424,17 @@ namespace SkiaSharp
base.Dispose (disposing);
}
public static bool IsPathSupported (string path) => SKFileStream.IsPathSupported (path);
public static SKWStream OpenStream (string path)
{
if (!IsPathSupported (path)) {
return new SKManagedWStream (File.OpenWrite (path), true);
} else {
return new SKFileWStream (path);
}
}
}
public class SKDynamicMemoryWStream : SKWStream

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

@ -55,7 +55,13 @@ namespace SkiaSharp
{
if (path == null)
throw new ArgumentNullException (nameof (path));
return GetObject<SKTypeface> (SkiaApi.sk_typeface_create_from_file (path, index));
using (var stream = SKFileStream.OpenStream (path)) {
if (stream == null) {
return null;
} else {
return FromStream (stream, index);
}
}
}
public static SKTypeface FromStream (Stream stream, int index = 0)

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

@ -39,7 +39,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.6" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />

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

@ -25,7 +25,7 @@
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.0.1" />
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.3.0" />
</ItemGroup>
<Import Project="..\Binding\Binding.projitems" Label="Shared" />
<Import Project="..\Binding.Shared\Binding.Shared.projitems" Label="Shared" />

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

@ -41,7 +41,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.6" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />

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

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Android", "SkiaSharp.Android\SkiaSharp.Android.csproj", "{C737DC80-5B71-4B26-A2DC-DA30421788B0}"
EndProject
@ -27,21 +27,21 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "Binding.S
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Binding\Binding.projitems*{4588a759-3853-49b8-8a68-6c7917be9220}*SharedItemsImports = 4
binding\Binding.projitems*{4588a759-3853-49b8-8a68-6c7917be9220}*SharedItemsImports = 4
Binding.Shared\Binding.Shared.projitems*{5180e370-a455-42bb-99f9-97bd269b8a52}*SharedItemsImports = 4
Binding\Binding.projitems*{5180e370-a455-42bb-99f9-97bd269b8a52}*SharedItemsImports = 4
binding\Binding.projitems*{5180e370-a455-42bb-99f9-97bd269b8a52}*SharedItemsImports = 4
Binding.Shared\Binding.Shared.projitems*{099A4BAD-6CF7-4898-9D16-266BDD844F95}*SharedItemsImports = 4
Binding\Binding.projitems*{099A4BAD-6CF7-4898-9D16-266BDD844F95}*SharedItemsImports = 4
binding\Binding.projitems*{099A4BAD-6CF7-4898-9D16-266BDD844F95}*SharedItemsImports = 4
Binding.Shared\Binding.Shared.projitems*{6a678cfb-21a7-4e81-8909-fd72abbfd408}*SharedItemsImports = 4
Binding\Binding.projitems*{6a678cfb-21a7-4e81-8909-fd72abbfd408}*SharedItemsImports = 4
binding\Binding.projitems*{6a678cfb-21a7-4e81-8909-fd72abbfd408}*SharedItemsImports = 4
Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
Binding.Shared\Binding.Shared.projitems*{bab615aa-956e-4079-b260-dd7b1f52ec7d}*SharedItemsImports = 4
Binding\Binding.projitems*{bab615aa-956e-4079-b260-dd7b1f52ec7d}*SharedItemsImports = 4
binding\Binding.projitems*{bab615aa-956e-4079-b260-dd7b1f52ec7d}*SharedItemsImports = 4
Binding.Shared\Binding.Shared.projitems*{c737dc80-5b71-4b26-a2dc-da30421788b0}*SharedItemsImports = 4
Binding\Binding.projitems*{c737dc80-5b71-4b26-a2dc-da30421788b0}*SharedItemsImports = 4
binding\Binding.projitems*{c737dc80-5b71-4b26-a2dc-da30421788b0}*SharedItemsImports = 4
Binding.Shared\Binding.Shared.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
Binding\Binding.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
binding\Binding.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

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

@ -37,9 +37,9 @@ var HARFBUZZ_VERSION_FILE = "1.4.6.0";
var HARFBUZZ_VERSION_SONAME = HARFBUZZ_VERSION_FILE.Substring(0, HARFBUZZ_VERSION_FILE.LastIndexOf("."));
var VERSION_PACKAGES = new Dictionary<string, string> {
{ "SkiaSharp", "1.60.0" },
{ "SkiaSharp.Views", "1.60.0" },
{ "SkiaSharp.Views.Forms", "1.60.0" },
{ "SkiaSharp", "1.60.0-beta" },
{ "SkiaSharp.Views", "1.60.0-beta" },
{ "SkiaSharp.Views.Forms", "1.60.0-beta" },
{ "SkiaSharp.HarfBuzz", "1.60.0-beta" },
{ "HarfBuzzSharp", "1.4.6" },
@ -86,7 +86,7 @@ Task ("libs")
.Does (() =>
{
// create all the directories
EnsureDirectoryExists ("./output/windows/");
EnsureDirectoryExists ("./output/wpf/");
EnsureDirectoryExists ("./output/uwp/");
EnsureDirectoryExists ("./output/android/");
EnsureDirectoryExists ("./output/ios/");
@ -99,6 +99,7 @@ Task ("libs")
EnsureDirectoryExists ("./output/linux/");
EnsureDirectoryExists ("./output/interactive/");
EnsureDirectoryExists ("./output/desktop/");
EnsureDirectoryExists ("./output/gtk/");
// .NET Standard / .NET Core
RunNuGetRestore ("source/SkiaSharpSource.NetStandard.sln");
@ -125,10 +126,8 @@ Task ("libs")
CopyFileToDirectory ("./binding/HarfBuzzSharp.UWP/bin/Release/HarfBuzzSharp.pri", "./output/uwp/");
// SkiaSharp.Views
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.UWP/bin/Release/SkiaSharp.Views.UWP.dll", "./output/uwp/");
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.Desktop/bin/Release/SkiaSharp.Views.Desktop.dll", "./output/windows/");
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.WPF/bin/Release/SkiaSharp.Views.WPF.dll", "./output/windows/");
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.WPF/bin/Release/SkiaSharp.Views.WPF.dll", "./output/wpf/");
// SkiaSharp.Views.Forms
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/bin/Release/SkiaSharp.Views.Forms.dll", "./output/portable/");
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/bin/Release/SkiaSharp.Views.Forms.dll", "./output/uwp/");
} else if (IsRunningOnMac ()) {
// fix for old MSBuild
@ -152,20 +151,26 @@ Task ("libs")
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.Mac/bin/Release/SkiaSharp.Views.Mac.dll", "./output/osx/");
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.tvOS/bin/Release/SkiaSharp.Views.tvOS.dll", "./output/tvos/");
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.watchOS/bin/Release/SkiaSharp.Views.watchOS.dll", "./output/watchos/");
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.Gtk/bin/Release/SkiaSharp.Views.Gtk.dll", "./output/gtk/");
// SkiaSharp.Views.Forms
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/bin/Release/SkiaSharp.Views.Forms.dll", "./output/portable/");
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Android/bin/Release/SkiaSharp.Views.Forms.dll", "./output/android/");
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.iOS/bin/Release/SkiaSharp.Views.Forms.dll", "./output/ios/");
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Mac/bin/Release/SkiaSharp.Views.Forms.dll", "./output/osx/");
} else if (IsRunningOnLinux ()) {
RunNuGetRestore ("./source/SkiaSharpSource.Linux.sln");
RunMSBuild ("./source/SkiaSharpSource.Linux.sln");
// SkiaSharp.Views
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.Gtk/bin/Release/SkiaSharp.Views.Gtk.dll", "./output/gtk/");
}
// SkiaSharp
CopyFileToDirectory ("./binding/SkiaSharp.Desktop/bin/Release/SkiaSharp.dll", "./output/desktop/");
CopyFileToDirectory ("./binding/SkiaSharp.Desktop/bin/Release/nuget/build/net45/SkiaSharp.dll.config", "./output/desktop/");
CopyFileToDirectory ("./binding/SkiaSharp.Desktop/bin/Release/nuget/build/net45/SkiaSharp.Desktop.targets", "./output/desktop/");
CopyFileToDirectory ("./binding/SkiaSharp.Portable/bin/Release/SkiaSharp.dll", "./output/portable/");
// SkiaSharp.Views
CopyFileToDirectory ("./source/SkiaSharp.Views/SkiaSharp.Views.Desktop/bin/Release/SkiaSharp.Views.Desktop.dll", "./output/desktop/");
// SkiaSharp.Views.Forms
CopyFileToDirectory ("./source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/bin/Release/SkiaSharp.Views.Forms.dll", "./output/portable/");
// HarfBuzzSharp
CopyFileToDirectory ("./binding/HarfBuzzSharp.Desktop/bin/Release/HarfBuzzSharp.dll", "./output/desktop/");
CopyFileToDirectory ("./binding/HarfBuzzSharp.Desktop/bin/Release/nuget/build/net45/HarfBuzzSharp.dll.config", "./output/desktop/");
@ -259,35 +264,67 @@ Task ("samples")
.Does (() =>
{
ClearSkiaSharpNuGetCache ();
CleanDirectories ("./samples/*/packages/SkiaSharp.*");
CleanDirectories ("./samples/*/*/*/packages/SkiaSharp.*");
// zip the samples for the GitHub release notes
if (IS_ON_CI) {
Zip ("./samples", "./output/samples.zip");
}
if (IsRunningOnLinux ()) {
// BASIC samples
RunNuGetRestore ("./samples/Basic/NetCore/SkiaSharpSample.sln");
RunMSBuild ("./samples/Basic/NetCore/SkiaSharpSample.sln");
RunNuGetRestore ("./samples/Basic/Desktop/SkiaSharpSample.sln");
RunMSBuild ("./samples/Basic/Desktop/SkiaSharpSample.sln");
// GALLERY samples
if (IsRunningOnLinux ()) {
// BASIC samples
RunNuGetRestore ("./samples/Basic/Gtk/SkiaSharpSample.sln");
RunMSBuild ("./samples/Basic/Gtk/SkiaSharpSample.sln");
// GALLERY samples
}
if (IsRunningOnMac ()) {
RunNuGetRestore ("./samples/MacSample/MacSample.sln");
RunMSBuildWithPlatform ("./samples/MacSample/MacSample.sln", "x86");
RunNuGetRestore ("./samples/FormsSample/FormsSample.Mac.sln");
RunMSBuildWithPlatform ("./samples/FormsSample/FormsSample.Mac.sln", "iPhone");
RunNuGetRestore ("./samples/TvSample/TvSample.sln");
RunMSBuildWithPlatform ("./samples/TvSample/TvSample.sln", "iPhoneSimulator");
// BASIC samples
RunNuGetRestore ("./samples/Basic/Android/SkiaSharpSample.sln");
RunMSBuild ("./samples/Basic/Android/SkiaSharpSample.sln");
RunNuGetRestore ("./samples/Basic/iOS/SkiaSharpSample.sln");
RunMSBuildWithPlatform ("./samples/Basic/iOS/SkiaSharpSample.sln", "iPhone");
RunNuGetRestore ("./samples/Basic/macOS/SkiaSharpSample.sln");
RunMSBuild ("./samples/Basic/macOS/SkiaSharpSample.sln");
RunNuGetRestore ("./samples/Basic/tvOS/SkiaSharpSample.sln");
RunMSBuildWithPlatform ("./samples/Basic/tvOS/SkiaSharpSample.sln", "iPhoneSimulator");
RunNuGetRestore ("./samples/Basic/Gtk/SkiaSharpSample.sln");
RunMSBuild ("./samples/Basic/Gtk/SkiaSharpSample.sln");
// GALLERY samples
RunNuGetRestore ("./samples/Gallery/MacSample/MacSample.sln");
RunMSBuildWithPlatform ("./samples/Gallery/MacSample/MacSample.sln", "x86");
RunNuGetRestore ("./samples/Gallery/FormsSample/FormsSample.Mac.sln");
RunMSBuildWithPlatform ("./samples/Gallery/FormsSample/FormsSample.Mac.sln", "iPhone");
RunNuGetRestore ("./samples/Gallery/TvSample/TvSample.sln");
RunMSBuildWithPlatform ("./samples/Gallery/TvSample/TvSample.sln", "iPhoneSimulator");
}
if (IsRunningOnWindows ()) {
RunNuGetRestore ("./samples/WPFSample/WPFSample.sln");
RunMSBuild ("./samples/WPFSample/WPFSample.sln");
RunNuGetRestore ("./samples/UWPSample/UWPSample.sln");
RunMSBuildWithPlatformTarget ("./samples/UWPSample/UWPSample.sln", "x86");
RunNuGetRestore ("./samples/FormsSample/FormsSample.Windows.sln");
RunMSBuildWithPlatformTarget ("./samples/FormsSample/FormsSample.Windows.sln", "x86");
RunNuGetRestore ("./samples/WindowsSample/WindowsSample.sln");
RunMSBuild ("./samples/WindowsSample/WindowsSample.sln");
// BASIC samples
RunNuGetRestore ("./samples/Basic/WPF/SkiaSharpSample.sln");
RunMSBuild ("./samples/Basic/WPF/SkiaSharpSample.sln");
RunNuGetRestore ("./samples/Basic/UWP/SkiaSharpSample.sln");
RunMSBuildWithPlatformTarget ("./samples/Basic/UWP/SkiaSharpSample.sln", "x86");
// GALLERY samples
RunNuGetRestore ("./samples/Gallery/WPFSample/WPFSample.sln");
RunMSBuild ("./samples/Gallery/WPFSample/WPFSample.sln");
RunNuGetRestore ("./samples/Gallery/UWPSample/UWPSample.sln");
RunMSBuildWithPlatformTarget ("./samples/Gallery/UWPSample/UWPSample.sln", "x86");
RunNuGetRestore ("./samples/Gallery/FormsSample/FormsSample.Windows.sln");
RunMSBuildWithPlatformTarget ("./samples/Gallery/FormsSample/FormsSample.Windows.sln", "x86");
RunNuGetRestore ("./samples/Gallery/WindowsSample/WindowsSample.sln");
RunMSBuild ("./samples/Gallery/WindowsSample/WindowsSample.sln");
}
});
@ -396,8 +433,8 @@ Task ("update-docs")
// add windows-specific assemblies
if (IsRunningOnWindows ()) {
assemblies = assemblies.Union (new FilePath [] {
"./output/windows/SkiaSharp.Views.Desktop.dll",
"./output/windows/SkiaSharp.Views.WPF.dll",
"./output/desktop/SkiaSharp.Views.Desktop.dll",
"./output/wpf/SkiaSharp.Views.WPF.dll",
"./output/android/SkiaSharp.Views.Android.dll",
"./output/ios/SkiaSharp.Views.iOS.dll",
"./output/osx/SkiaSharp.Views.Mac.dll",
@ -409,6 +446,8 @@ Task ("update-docs")
// add mac-specific assemblies
if (IsRunningOnMac ()) {
assemblies = assemblies.Union (new FilePath [] {
"./output/desktop/SkiaSharp.Views.Desktop.dll",
"./output/gtk/SkiaSharp.Views.Gtk.dll",
"./output/android/SkiaSharp.Views.Android.dll",
"./output/ios/SkiaSharp.Views.iOS.dll",
"./output/osx/SkiaSharp.Views.Mac.dll",
@ -416,6 +455,13 @@ Task ("update-docs")
"./output/watchos/SkiaSharp.Views.watchOS.dll",
}).ToArray ();
}
// add linux-specific assemblies
if (IsRunningOnLinux ()) {
assemblies = assemblies.Union (new FilePath [] {
"./output/desktop/SkiaSharp.Views.Desktop.dll",
"./output/gtk/SkiaSharp.Views.Gtk.dll",
}).ToArray ();
}
// print out the assemblies
foreach (var r in refs) {
@ -493,6 +539,7 @@ Task ("nuget")
if (IsRunningOnLinux ()) {
PackageNuGet ("./nuget/SkiaSharp.Linux.nuspec", "./output/");
PackageNuGet ("./nuget/HarfBuzzSharp.Linux.nuspec", "./output/");
PackageNuGet ("./nuget/SkiaSharp.Views.Linux.nuspec", "./output/");
}
}
// HarfBuzz is a PCL
@ -548,11 +595,11 @@ Task ("set-versions")
add ("./source/*/*/*.nuget.targets");
add ("./source/*/*/*.csproj");
// sample packages files
add ("./samples/*/*/packages.config");
add ("./samples/*/*/project.json");
add ("./samples/*/*/*/packages.config");
add ("./samples/*/*/*/project.json");
// sample project files
add ("./samples/*/*/*.nuget.targets");
add ("./samples/*/*/*.csproj");
add ("./samples/*/*/*/*.nuget.targets");
add ("./samples/*/*/*/*.csproj");
// tests packages files
add ("./tests/*/packages.config");
add ("./tests/*/project.json");
@ -602,14 +649,14 @@ Task ("clean-managed").Does (() =>
CleanDirectories ("./binding/*/obj");
DeleteFiles ("./binding/*/project.lock.json");
CleanDirectories ("./samples/*/bin");
CleanDirectories ("./samples/*/obj");
CleanDirectories ("./samples/*/AppPackages");
CleanDirectories ("./samples/*/*/bin");
CleanDirectories ("./samples/*/*/obj");
DeleteFiles ("./samples/*/*/project.lock.json");
CleanDirectories ("./samples/*/*/AppPackages");
CleanDirectories ("./samples/*/packages");
CleanDirectories ("./samples/*/*/*/bin");
CleanDirectories ("./samples/*/*/*/obj");
DeleteFiles ("./samples/*/*/*/project.lock.json");
CleanDirectories ("./samples/*/*/*/AppPackages");
CleanDirectories ("./samples/*/*/packages");
CleanDirectories ("./tests/**/bin");
CleanDirectories ("./tests/**/obj");

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

@ -271,7 +271,7 @@
<ReturnType>System.Nullable&lt;System.Single&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets tosition of the top of the underline stroke relative to the baseline.</summary>
<summary>Gets the position of the top of the underline stroke relative to the baseline.</summary>
<value>
<para></para>
</value>

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

@ -1 +1 @@
Subproject commit ba28e460fb0899ffe80c1d1364a3e02d4a2e8855
Subproject commit 3929e9ee94affead0d2e5c8e6c12e1ce60b09e2a

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

@ -1 +1 @@
Subproject commit deb7958f7202f724bdb8f48414670d4706ae3952
Subproject commit 2ef76f9178eb9d9d97064f164ac055913d07b79c

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

@ -14,7 +14,7 @@
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>xamarin,graphics,ios,android,windows,uwp,tvos,watchos,macos,cross-platform,skiasharp</tags>
<dependencies>
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="HarfBuzzSharp" version="1.4.6" />
</dependencies>
</metadata>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp</id>
<title>SkiaSharp (for Linux)</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp</id>
<title>SkiaSharp (for macOS)</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views.Forms</id>
<title>SkiaSharp for Xamarin.Forms (for macOS)</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -15,23 +15,23 @@
<tags>ui,xamarin.forms,xamarin,graphics,ios,android,linux,windows,uwp,tvos,macos,cross-platform,skiasharp</tags>
<dependencies>
<group>
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
</group>
<group targetFramework="MonoAndroid">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
<group targetFramework="XamariniOS">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
<group targetFramework="XamarinMac">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
</dependencies>
</metadata>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views.Forms</id>
<title>SkiaSharp for Xamarin.Forms (for Windows)</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -15,13 +15,13 @@
<tags>ui,xamarin.forms,xamarin,graphics,ios,android,linux,windows,uwp,tvos,macos,cross-platform,skiasharp</tags>
<dependencies>
<group>
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
</group>
<group targetFramework="uap10.0">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
</dependencies>
</metadata>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views.Forms</id>
<title>SkiaSharp for Xamarin.Forms</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -15,28 +15,28 @@
<tags>ui,xamarin.forms,xamarin,graphics,ios,android,linux,windows,uwp,tvos,macos,cross-platform,skiasharp</tags>
<dependencies>
<group>
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
</group>
<group targetFramework="MonoAndroid">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
<group targetFramework="XamariniOS">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
<group targetFramework="XamarinMac">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
<group targetFramework="uap10.0">
<dependency id="Xamarin.Forms" version="2.4.0" />
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp.Views" version="1.60.0" />
<dependency id="Xamarin.Forms" version="2.5.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
<dependency id="SkiaSharp.Views" version="1.60.0-beta" />
</group>
</dependencies>
</metadata>

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

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>SkiaSharp.Views</id>
<title>SkiaSharp Views &amp; Layers (for Linux)</title>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>SkiaSharp Views &amp; Layers are a set of platform-specific views and containers that can be used to draw on the screen.</description>
<copyright>Copyright (c) Xamarin Inc. 2016</copyright>
<licenseUrl>https://github.com/mono/SkiaSharp/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>ui,xamarin,graphics,ios,android,linux,windows,uwp,tvos,watchos,macos,cross-platform,skiasharp</tags>
<dependencies>
<dependency id="SkiaSharp" version="1.60.0-beta" />
</dependencies>
</metadata>
<files>
<!-- Desktop -->
<file src="output/desktop/SkiaSharp.Views.Desktop.dll" target="lib/net45" />
<!-- GTK -->
<file src="output/gtk/SkiaSharp.Views.Gtk.dll" target="lib/net45" />
</files>
</package>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views</id>
<title>SkiaSharp Views &amp; Layers (for macOS)</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -14,7 +14,7 @@
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>ui,xamarin,graphics,ios,android,linux,windows,uwp,tvos,watchos,macos,cross-platform,skiasharp</tags>
<dependencies>
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
</dependencies>
</metadata>
<files>
@ -23,5 +23,7 @@
<file src="output/tvos/SkiaSharp.Views.tvOS.dll" target="lib/XamarintvOS" />
<file src="output/watchos/SkiaSharp.Views.watchOS.dll" target="lib/XamarinwatchOS" />
<file src="output/osx/SkiaSharp.Views.Mac.dll" target="lib/XamarinMac" />
<file src="output/desktop/SkiaSharp.Views.Desktop.dll" target="lib/net45" />
<file src="output/gtk/SkiaSharp.Views.Gtk.dll" target="lib/net45" />
</files>
</package>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views</id>
<title>SkiaSharp Views &amp; Layers (for Windows)</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -14,13 +14,14 @@
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>ui,xamarin,graphics,ios,android,linux,windows,uwp,tvos,watchos,macos,cross-platform,skiasharp</tags>
<dependencies>
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
</dependencies>
</metadata>
<files>
<!-- Desktop -->
<file src="output/desktop/SkiaSharp.Views.Desktop.dll" target="lib/net45" />
<!-- Windows -->
<file src="output/windows/SkiaSharp.Views.Desktop.dll" target="lib/net45" />
<file src="output/windows/SkiaSharp.Views.WPF.dll" target="lib/net45" />
<file src="output/wpf/SkiaSharp.Views.WPF.dll" target="lib/net45" />
<!-- UWP -->
<file src="output/uwp/SkiaSharp.Views.UWP.dll" target="lib/uap10.0" />
</files>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views</id>
<title>SkiaSharp Views &amp; Layers</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -14,7 +14,7 @@
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<tags>ui,xamarin,graphics,ios,android,linux,windows,uwp,tvos,watchos,macos,cross-platform,skiasharp</tags>
<dependencies>
<dependency id="SkiaSharp" version="1.60.0" />
<dependency id="SkiaSharp" version="1.60.0-beta" />
</dependencies>
</metadata>
<files>
@ -28,9 +28,12 @@
<file src="output/watchos/SkiaSharp.Views.watchOS.dll" target="lib/XamarinwatchOS" />
<!-- macOS -->
<file src="output/osx/SkiaSharp.Views.Mac.dll" target="lib/XamarinMac" />
<!-- Desktop -->
<file src="output/desktop/SkiaSharp.Views.Desktop.dll" target="lib/net45" />
<!-- Windows -->
<file src="output/windows/SkiaSharp.Views.Desktop.dll" target="lib/net45" />
<file src="output/windows/SkiaSharp.Views.WPF.dll" target="lib/net45" />
<file src="output/wpf/SkiaSharp.Views.WPF.dll" target="lib/net45" />
<!-- GTK -->
<file src="output/gtk/SkiaSharp.Views.Gtk.dll" target="lib/net45" />
<!-- UWP -->
<file src="output/uwp/SkiaSharp.Views.UWP.dll" target="lib/uap10.0" />
</files>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp</id>
<title>SkiaSharp (for Windows)</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp</id>
<title>SkiaSharp</title>
<version>1.60.0</version>
<version>1.60.0-beta</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

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

@ -1,17 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.13
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "..\..\..\Binding\Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "..\..\..\binding\Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Android", "..\..\..\Binding\SkiaSharp.Android\SkiaSharp.Android.csproj", "{C737DC80-5B71-4B26-A2DC-DA30421788B0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Android", "..\..\..\binding\SkiaSharp.Android\SkiaSharp.Android.csproj", "{C737DC80-5B71-4B26-A2DC-DA30421788B0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.Android", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Android\SkiaSharp.Views.Android.csproj", "{926C8D29-E047-4F4E-8B35-852E47BFA9F5}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.Shared", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.shproj", "{5A67972C-1C04-4913-9950-06A03BFE9533}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "..\..\..\Binding\Binding.Shared\Binding.Shared.shproj", "{6F8349DC-90AC-441D-8B8B-BE623F46BE6D}"
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "..\..\..\binding\Binding.Shared\Binding.Shared.shproj", "{6F8349DC-90AC-441D-8B8B-BE623F46BE6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharpSample", "SkiaSharpSample\SkiaSharpSample.csproj", "{A7B93BAB-7099-4A27-9298-C5C2F11A2E34}"
EndProject
@ -19,71 +18,26 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{8D4632
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems*{1555d119-8598-4e4d-91ac-d313f94a1673}*SharedItemsImports = 4
..\binding\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems*{1aaa8f60-6138-4dfe-b240-5a0f3fb87e0f}*SharedItemsImports = 13
..\Binding\Binding.Shared\Binding.Shared.projitems*{2ae5d8c5-eac6-4515-89f2-a4994b41c925}*SharedItemsImports = 4
..\binding\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems*{2ae5d8c5-eac6-4515-89f2-a4994b41c925}*SharedItemsImports = 4
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems*{2f94f024-1841-47e8-b521-74aa4e3eba54}*SharedItemsImports = 4
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems*{2f94f024-1841-47e8-b521-74aa4e3eba54}*SharedItemsImports = 4
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems*{314fb505-9858-4e03-b799-91b0ba627d05}*SharedItemsImports = 13
..\Binding\Binding.Shared\Binding.Shared.projitems*{4588a759-3853-49b8-8a68-6c7917be9220}*SharedItemsImports = 4
..\Binding\Binding\Binding.projitems*{4588a759-3853-49b8-8a68-6c7917be9220}*SharedItemsImports = 4
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems*{4ac36d63-bf11-445f-81ee-107c0cef4fc9}*SharedItemsImports = 4
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems*{4ac36d63-bf11-445f-81ee-107c0cef4fc9}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{5180e370-a455-42bb-99f9-97bd269b8a52}*SharedItemsImports = 4
..\Binding\Binding\Binding.projitems*{5180e370-a455-42bb-99f9-97bd269b8a52}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{099A4BAD-6CF7-4898-9D16-266BDD844F95}*SharedItemsImports = 4
..\Binding\Binding\Binding.projitems*{099A4BAD-6CF7-4898-9D16-266BDD844F95}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{5a67972c-1c04-4913-9950-06a03bfe9533}*SharedItemsImports = 13
..\Binding\Binding.Shared\Binding.Shared.projitems*{6a678cfb-21a7-4e81-8909-fd72abbfd408}*SharedItemsImports = 4
..\Binding\Binding\Binding.projitems*{6a678cfb-21a7-4e81-8909-fd72abbfd408}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
SkiaSharp.Views\SkiaSharp.Views.AppleiOS\SkiaSharp.Views.AppleiOS.projitems*{74c78108-9199-4a7a-928c-fc4dc57d0ae4}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Apple\SkiaSharp.Views.Apple.projitems*{74c78108-9199-4a7a-928c-fc4dc57d0ae4}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{74c78108-9199-4a7a-928c-fc4dc57d0ae4}*SharedItemsImports = 4
SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz.Shared\SkiaSharp.HarfBuzz.Shared.projitems*{7cad1912-05a5-42e5-b7ba-81bb051f0566}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Apple\SkiaSharp.Views.Apple.projitems*{809a15dc-e675-4a24-83fa-df13160f7e4c}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{809a15dc-e675-4a24-83fa-df13160f7e4c}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{8d646738-458a-441f-b69b-253ef058a812}*SharedItemsImports = 4
..\binding\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems*{8d646738-458a-441f-b69b-253ef058a812}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{0C940695-4868-4CF7-7D16-266BDD88A812}*SharedItemsImports = 4
..\binding\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems*{0C940695-4868-4CF7-7D16-266BDD88A812}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{926c8d29-e047-4f4e-8b35-852e47bfa9f5}*SharedItemsImports = 4
..\Binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz.Shared\SkiaSharp.HarfBuzz.Shared.projitems*{c3e63b2d-95d4-4c3f-b10f-7a0aacf94980}*SharedItemsImports = 13
..\Binding\Binding.Shared\Binding.Shared.projitems*{c737dc80-5b71-4b26-a2dc-da30421788b0}*SharedItemsImports = 4
..\Binding\Binding\Binding.projitems*{c737dc80-5b71-4b26-a2dc-da30421788b0}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Apple\SkiaSharp.Views.Apple.projitems*{cbca14e7-96c9-4697-909c-19b1ef7298f7}*SharedItemsImports = 13
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems*{cebd25fd-dd4f-4d5f-b809-d50d02176f41}*SharedItemsImports = 13
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Native.Shared\SkiaSharp.Views.Forms.Native.Shared.projitems*{da5da4d8-4885-4af2-96bb-ae803c344ab0}*SharedItemsImports = 4
SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.Shared\SkiaSharp.Views.Forms.Shared.projitems*{da5da4d8-4885-4af2-96bb-ae803c344ab0}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.AppleiOS\SkiaSharp.Views.AppleiOS.projitems*{e5973829-6c8b-43e4-b81b-c8492df26c90}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Apple\SkiaSharp.Views.Apple.projitems*{e5973829-6c8b-43e4-b81b-c8492df26c90}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{e5973829-6c8b-43e4-b81b-c8492df26c90}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.AppleiOS\SkiaSharp.Views.AppleiOS.projitems*{9E850CCA-54CC-4CEB-B2C2-E32EF4A17D61}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Apple\SkiaSharp.Views.Apple.projitems*{9E850CCA-54CC-4CEB-B2C2-E32EF4A17D61}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{9E850CCA-54CC-4CEB-B2C2-E32EF4A17D61}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{e6b786c4-3bf9-4a42-9a4a-08002ae3fdad}*SharedItemsImports = 4
..\binding\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems*{e6b786c4-3bf9-4a42-9a4a-08002ae3fdad}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{e8192110-fcf9-4972-9472-7408bc2ca56b}*SharedItemsImports = 4
..\binding\HarfBuzzSharp.Shared\HarfBuzzSharp.Shared.projitems*{e8192110-fcf9-4972-9472-7408bc2ca56b}*SharedItemsImports = 4
..\Binding\Binding.Shared\Binding.Shared.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
..\Binding\Binding\Binding.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
SkiaSharp.Views\SkiaSharp.Views.AppleiOS\SkiaSharp.Views.AppleiOS.projitems*{ff4c9f9f-7a6a-44d1-8338-d30e39e4e9d4}*SharedItemsImports = 13
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{5a67972c-1c04-4913-9950-06a03bfe9533}*SharedItemsImports = 13
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{926c8d29-e047-4f4e-8b35-852e47bfa9f5}*SharedItemsImports = 4
..\..\..\binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{c737dc80-5b71-4b26-a2dc-da30421788b0}*SharedItemsImports = 4
..\..\..\binding\Binding\Binding.projitems*{c737dc80-5b71-4b26-a2dc-da30421788b0}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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
{C737DC80-5B71-4B26-A2DC-DA30421788B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C737DC80-5B71-4B26-A2DC-DA30421788B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C737DC80-5B71-4B26-A2DC-DA30421788B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C737DC80-5B71-4B26-A2DC-DA30421788B0}.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
{A7B93BAB-7099-4A27-9298-C5C2F11A2E34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7B93BAB-7099-4A27-9298-C5C2F11A2E34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7B93BAB-7099-4A27-9298-C5C2F11A2E34}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -94,9 +48,12 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9C502B9A-25D4-473F-89BD-5A13DDE16354} = {8D4632F4-AD16-433C-A22B-97F13CAE5663}
{6F8349DC-90AC-441D-8B8B-BE623F46BE6D} = {8D4632F4-AD16-433C-A22B-97F13CAE5663}
{C737DC80-5B71-4B26-A2DC-DA30421788B0} = {8D4632F4-AD16-433C-A22B-97F13CAE5663}
{926C8D29-E047-4F4E-8B35-852E47BFA9F5} = {8D4632F4-AD16-433C-A22B-97F13CAE5663}
{5A67972C-1C04-4913-9950-06A03BFE9533} = {8D4632F4-AD16-433C-A22B-97F13CAE5663}
{6F8349DC-90AC-441D-8B8B-BE623F46BE6D} = {8D4632F4-AD16-433C-A22B-97F13CAE5663}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D2C06CC6-7ADB-40B0-9C60-5F60E085960E}
EndGlobalSection
EndGlobal

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

@ -1,5 +1,5 @@
<?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.skiasharpsample">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" package="com.companyname.skiasharpsample" android:versionCode="1">
<uses-sdk android:minSdkVersion="10" />
<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:theme="@style/Theme.AppCompat"></application>
<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:theme="@style/Theme.AppCompat" android:hardwareAccelerated="true"></application>
</manifest>

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

@ -84,7 +84,7 @@
<Project>{926C8D29-E047-4F4E-8B35-852E47BFA9F5}</Project>
<Name>SkiaSharp.Views.Android</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Binding\SkiaSharp.Android\SkiaSharp.Android.csproj">
<ProjectReference Include="..\..\..\..\binding\SkiaSharp.Android\SkiaSharp.Android.csproj">
<Project>{C737DC80-5B71-4B26-A2DC-DA30421788B0}</Project>
<Name>SkiaSharp.Android</Name>
</ProjectReference>

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

@ -0,0 +1,60 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.Desktop", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Desktop\SkiaSharp.Views.Desktop.csproj", "{E5A90865-C185-45AD-88D1-6DA7D6004B03}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.Shared", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.shproj", "{5A67972C-1C04-4913-9950-06A03BFE9533}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "..\..\..\binding\Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Desktop", "..\..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj", "{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{F19E1537-81B2-4D4F-A69E-78DC73ACC141}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "..\..\..\binding\Binding.Shared\Binding.Shared.shproj", "{6F8349DC-90AC-441D-8B8B-BE623F46BE6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharpSample", "SkiaSharpSample\SkiaSharpSample.csproj", "{3214B4BB-D4AD-450F-8296-2905B6CDEFF0}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{5a67972c-1c04-4913-9950-06a03bfe9533}*SharedItemsImports = 13
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
..\..\..\binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{e5a90865-c185-45ad-88d1-6da7d6004b03}*SharedItemsImports = 4
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
..\..\..\binding\Binding\Binding.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Release|Any CPU.Build.0 = Release|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Release|Any CPU.Build.0 = Release|Any CPU
{3214B4BB-D4AD-450F-8296-2905B6CDEFF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3214B4BB-D4AD-450F-8296-2905B6CDEFF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3214B4BB-D4AD-450F-8296-2905B6CDEFF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3214B4BB-D4AD-450F-8296-2905B6CDEFF0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E5A90865-C185-45AD-88D1-6DA7D6004B03} = {F19E1537-81B2-4D4F-A69E-78DC73ACC141}
{5A67972C-1C04-4913-9950-06A03BFE9533} = {F19E1537-81B2-4D4F-A69E-78DC73ACC141}
{9C502B9A-25D4-473F-89BD-5A13DDE16354} = {F19E1537-81B2-4D4F-A69E-78DC73ACC141}
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF} = {F19E1537-81B2-4D4F-A69E-78DC73ACC141}
{6F8349DC-90AC-441D-8B8B-BE623F46BE6D} = {F19E1537-81B2-4D4F-A69E-78DC73ACC141}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {67EACD19-0CEA-4127-9842-549AA6FB84C9}
EndGlobalSection
EndGlobal

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

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" />
</startup>
<!--<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>-->
</configuration>

61
samples/Basic/Desktop/SkiaSharpSample/Form1.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,61 @@
namespace SkiaSharpSample
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.skiaView = new SkiaSharp.Views.Desktop.SKControl();
this.SuspendLayout();
//
// skiaView
//
this.skiaView.Dock = System.Windows.Forms.DockStyle.Fill;
this.skiaView.Location = new System.Drawing.Point(0, 0);
this.skiaView.Name = "skiaView";
this.skiaView.Size = new System.Drawing.Size(774, 529);
this.skiaView.TabIndex = 0;
this.skiaView.Text = "skControl1";
this.skiaView.PaintSurface += new System.EventHandler<SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs>(this.skiaView_PaintSurface);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(774, 529);
this.Controls.Add(this.skiaView);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private SkiaSharp.Views.Desktop.SKControl skiaView;
}
}

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

@ -0,0 +1,43 @@
using System.Windows.Forms;
using SkiaSharp;
using SkiaSharp.Views.Desktop;
namespace SkiaSharpSample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void skiaView_PaintSurface(object sender, SKPaintSurfaceEventArgs e)
{
// the the canvas and properties
var canvas = e.Surface.Canvas;
// get the screen density for scaling
var scale = 1f;
var scaledSize = new SKSize(e.Info.Width / scale, e.Info.Height / scale);
// handle the device screen density
canvas.Scale(scale);
// make sure the canvas is blank
canvas.Clear(SKColors.White);
// draw some text
var paint = new SKPaint
{
Color = SKColors.Black,
IsAntialias = true,
Style = SKPaintStyle.Fill,
TextAlign = SKTextAlign.Center,
TextSize = 24
};
var coord = new SKPoint(scaledSize.Width / 2, (scaledSize.Height + paint.TextSize) / 2);
canvas.DrawText("SkiaSharp", coord, paint);
}
}
}

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

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

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

@ -0,0 +1,16 @@
using System;
using System.Windows.Forms;
namespace SkiaSharpSample
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

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

@ -0,0 +1,36 @@
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("SkiaSharpSample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkiaSharpSample")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3214b4bb-d4ad-450f-8296-2905b6cdeff0")]
// 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")]

63
samples/Basic/Desktop/SkiaSharpSample/Properties/Resources.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SkiaSharpSample.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SkiaSharpSample.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

26
samples/Basic/Desktop/SkiaSharpSample/Properties/Settings.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SkiaSharpSample.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

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

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3214B4BB-D4AD-450F-8296-2905B6CDEFF0}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>SkiaSharpSample</RootNamespace>
<AssemblyName>SkiaSharpSample</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj">
<Project>{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}</Project>
<Name>SkiaSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Desktop\SkiaSharp.Views.Desktop.csproj">
<Project>{e5a90865-c185-45ad-88d1-6da7d6004b03}</Project>
<Name>SkiaSharp.Views.Desktop</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets" Condition="Exists('..\..\..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets')" />
</Project>

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

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

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

@ -0,0 +1,66 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "..\..\..\binding\Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.Shared", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.shproj", "{5A67972C-1C04-4913-9950-06A03BFE9533}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{C335869B-7CC8-4239-B4A5-8031AA9758D3}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "..\..\..\binding\Binding.Shared\Binding.Shared.shproj", "{6F8349DC-90AC-441D-8B8B-BE623F46BE6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Desktop", "..\..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj", "{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.Gtk", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Gtk\SkiaSharp.Views.Gtk.csproj", "{67A502A4-E8B2-419A-811E-5A634B29C8D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.Desktop", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Desktop\SkiaSharp.Views.Desktop.csproj", "{E5A90865-C185-45AD-88D1-6DA7D6004B03}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharpSample", "SkiaSharpSample\SkiaSharpSample.csproj", "{17521786-7B50-46C5-BBCE-999FDEBB45A3}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{5a67972c-1c04-4913-9950-06a03bfe9533}*SharedItemsImports = 13
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
..\..\..\binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{e5a90865-c185-45ad-88d1-6da7d6004b03}*SharedItemsImports = 4
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
..\..\..\binding\Binding\Binding.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Release|Any CPU.Build.0 = Release|Any CPU
{67A502A4-E8B2-419A-811E-5A634B29C8D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67A502A4-E8B2-419A-811E-5A634B29C8D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67A502A4-E8B2-419A-811E-5A634B29C8D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67A502A4-E8B2-419A-811E-5A634B29C8D7}.Release|Any CPU.Build.0 = Release|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Release|Any CPU.Build.0 = Release|Any CPU
{17521786-7B50-46C5-BBCE-999FDEBB45A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17521786-7B50-46C5-BBCE-999FDEBB45A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17521786-7B50-46C5-BBCE-999FDEBB45A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17521786-7B50-46C5-BBCE-999FDEBB45A3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9C502B9A-25D4-473F-89BD-5A13DDE16354} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{5A67972C-1C04-4913-9950-06A03BFE9533} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{6F8349DC-90AC-441D-8B8B-BE623F46BE6D} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{67A502A4-E8B2-419A-811E-5A634B29C8D7} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{E5A90865-C185-45AD-88D1-6DA7D6004B03} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E3655CC9-9977-44C0-8A6A-69C88C0B451B}
EndGlobalSection
EndGlobal

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

@ -0,0 +1,49 @@
using System;
using Gtk;
using SkiaSharp;
using SkiaSharp.Views.Desktop;
public partial class MainWindow : Gtk.Window
{
public MainWindow()
: base(Gtk.WindowType.Toplevel)
{
Build();
skiaView.PaintSurface += OnPaintSurface;
}
protected void OnDeleteEvent(object sender, DeleteEventArgs a)
{
Application.Quit();
a.RetVal = true;
}
private void OnPaintSurface(object sender, SKPaintSurfaceEventArgs e)
{
// the the canvas and properties
var canvas = e.Surface.Canvas;
// get the screen density for scaling
var scale = 1f;
var scaledSize = new SKSize(e.Info.Width / scale, e.Info.Height / scale);
// handle the device screen density
canvas.Scale(scale);
// make sure the canvas is blank
canvas.Clear(SKColors.White);
// draw some text
var paint = new SKPaint
{
Color = SKColors.Black,
IsAntialias = true,
Style = SKPaintStyle.Fill,
TextAlign = SKTextAlign.Center,
TextSize = 24
};
var coord = new SKPoint(scaledSize.Width / 2, (scaledSize.Height + paint.TextSize) / 2);
canvas.DrawText("SkiaSharp", coord, paint);
}
}

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

@ -0,0 +1,16 @@
using System;
using Gtk;
namespace SkiaSharpSample
{
class MainClass
{
public static void Main(string[] args)
{
Application.Init();
MainWindow win = new MainWindow();
win.Show();
Application.Run();
}
}
}

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

@ -0,0 +1,26 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("SkiaSharpSample")]
[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.*")]
// 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("")]

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

@ -0,0 +1,63 @@
<?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>{17521786-7B50-46C5-BBCE-999FDEBB45A3}</ProjectGuid>
<OutputType>WinExe</OutputType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<RootNamespace>SkiaSharpSample</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Mono.Posix" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj">
<Project>{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}</Project>
<Name>SkiaSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Desktop\SkiaSharp.Views.Desktop.csproj">
<Project>{E5A90865-C185-45AD-88D1-6DA7D6004B03}</Project>
<Name>SkiaSharp.Views.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Gtk\SkiaSharp.Views.Gtk.csproj">
<Project>{67A502A4-E8B2-419A-811E-5A634B29C8D7}</Project>
<Name>SkiaSharp.Views.Gtk</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
<LogicalName>gui.stetic</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="gtk-gui\generated.cs" />
<Compile Include="MainWindow.cs" />
<Compile Include="gtk-gui\MainWindow.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets" Condition="Exists('..\..\..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets')" />
</Project>

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

@ -0,0 +1,28 @@
// This file has been generated by the GUI designer. Do not modify.
public partial class MainWindow
{
private global::SkiaSharp.Views.Gtk.SKWidget skiaView;
protected virtual void Build()
{
global::Stetic.Gui.Initialize(this);
// Widget MainWindow
this.Name = "MainWindow";
this.Title = global::Mono.Unix.Catalog.GetString("MainWindow");
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
// Container child MainWindow.Gtk.Container+ContainerChild
this.skiaView = new global::SkiaSharp.Views.Gtk.SKWidget();
this.skiaView.Name = "skiaView";
this.Add(this.skiaView);
if ((this.Child != null))
{
this.Child.ShowAll();
}
this.DefaultWidth = 400;
this.DefaultHeight = 300;
this.Show();
this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent);
}
}

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

@ -0,0 +1,30 @@
// This file has been generated by the GUI designer. Do not modify.
namespace Stetic
{
internal class Gui
{
private static bool initialized;
internal static void Initialize(Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false))
{
Stetic.Gui.initialized = true;
}
}
}
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup(System.Type type)
{
return Stetic.ActionGroups.GetActionGroup(type.FullName);
}
public static Gtk.ActionGroup GetActionGroup(string name)
{
return null;
}
}
}

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

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<stetic-interface>
<configuration>
<images-root-path>..</images-root-path>
<target-gtk-version>2.12</target-gtk-version>
</configuration>
<import>
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<widget-library name="../../../../../source/SkiaSharp.Views/SkiaSharp.Views.Gtk/bin/Debug/SkiaSharp.Views.Gtk.dll" />
<widget-library name="../bin/Debug/SkiaSharpSample.exe" internal="true" />
</import>
<widget class="Gtk.Window" id="MainWindow" design-size="400 300">
<property name="MemberName" />
<property name="Title" translatable="yes">MainWindow</property>
<property name="WindowPosition">CenterOnParent</property>
<signal name="DeleteEvent" handler="OnDeleteEvent" />
<child>
<widget class="SkiaSharp.Views.Gtk.SKWidget" id="skiaView">
<property name="MemberName" />
</widget>
</child>
</widget>
</stetic-interface>

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

@ -0,0 +1,45 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "..\..\..\binding\Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{C335869B-7CC8-4239-B4A5-8031AA9758D3}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "..\..\..\binding\Binding.Shared\Binding.Shared.shproj", "{6F8349DC-90AC-441D-8B8B-BE623F46BE6D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharpSample", "SkiaSharpSample\SkiaSharpSample.csproj", "{B6D1B569-6ED2-4C9D-9CD3-64ACB89303EA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.NetStandard", "..\..\..\binding\SkiaSharp.NetStandard\SkiaSharp.NetStandard.csproj", "{ADEB6908-D553-4ED3-94CD-CEC4CF0B34E2}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
..\..\..\binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6D1B569-6ED2-4C9D-9CD3-64ACB89303EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6D1B569-6ED2-4C9D-9CD3-64ACB89303EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6D1B569-6ED2-4C9D-9CD3-64ACB89303EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6D1B569-6ED2-4C9D-9CD3-64ACB89303EA}.Release|Any CPU.Build.0 = Release|Any CPU
{ADEB6908-D553-4ED3-94CD-CEC4CF0B34E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADEB6908-D553-4ED3-94CD-CEC4CF0B34E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADEB6908-D553-4ED3-94CD-CEC4CF0B34E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADEB6908-D553-4ED3-94CD-CEC4CF0B34E2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9C502B9A-25D4-473F-89BD-5A13DDE16354} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{6F8349DC-90AC-441D-8B8B-BE623F46BE6D} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{ADEB6908-D553-4ED3-94CD-CEC4CF0B34E2} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D802D896-3C98-498F-86AF-075791CFF220}
EndGlobalSection
EndGlobal

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

@ -0,0 +1,43 @@
using System.IO;
using SkiaSharp;
namespace SkiaSharpSample
{
class Program
{
static void Main(string[] args)
{
// crate a surface
var info = new SKImageInfo(256, 256);
using (var surface = SKSurface.Create(info))
{
// the the canvas and properties
var canvas = surface.Canvas;
// make sure the canvas is blank
canvas.Clear(SKColors.White);
// draw some text
var paint = new SKPaint
{
Color = SKColors.Black,
IsAntialias = true,
Style = SKPaintStyle.Fill,
TextAlign = SKTextAlign.Center,
TextSize = 24
};
var coord = new SKPoint(info.Width / 2, (info.Height + paint.TextSize) / 2);
canvas.DrawText("SkiaSharp", coord, paint);
// save the file
using (var image = surface.Snapshot())
using (var data = image.Encode(SKEncodedImageFormat.Png, 100))
using (var stream = File.OpenWrite("output.png"))
{
data.SaveTo(stream);
}
}
}
}
}

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

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\binding\SkiaSharp.NetStandard\SkiaSharp.NetStandard.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\native-builds\lib\windows\x64\libSkiaSharp.dll" Condition="Exists('..\..\..\..\native-builds\lib\windows\x64\libSkiaSharp.dll')">
<Link>libSkiaSharp.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\native-builds\lib\osx\libSkiaSharp.dylib" Condition="Exists('..\..\..\..\native-builds\lib\osx\libSkiaSharp.dylib')">
<Link>libSkiaSharp.dylib</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\native-builds\lib\linux\x64\libSkiaSharp.so" Condition="Exists('..\..\..\..\native-builds\lib\linux\x64\libSkiaSharp.so')">
<Link>libSkiaSharp.so</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

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

@ -0,0 +1,108 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.UWP", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.UWP\SkiaSharp.Views.UWP.csproj", "{8BB20362-91A2-4206-944D-634070EAC6F3}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.Shared", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.shproj", "{5A67972C-1C04-4913-9950-06A03BFE9533}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "..\..\..\binding\Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.UWP", "..\..\..\binding\SkiaSharp.UWP\SkiaSharp.UWP.csproj", "{BAB615AA-956E-4079-B260-DD7B1F52EC7D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{C335869B-7CC8-4239-B4A5-8031AA9758D3}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "..\..\..\binding\Binding.Shared\Binding.Shared.shproj", "{6F8349DC-90AC-441D-8B8B-BE623F46BE6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharpSample", "SkiaSharpSample\SkiaSharpSample.csproj", "{91B64285-C797-49FD-8252-EAD97BA38E27}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{5a67972c-1c04-4913-9950-06a03bfe9533}*SharedItemsImports = 13
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{8bb20362-91a2-4206-944d-634070eac6f3}*SharedItemsImports = 4
..\..\..\binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{bab615aa-956e-4079-b260-dd7b1f52ec7d}*SharedItemsImports = 4
..\..\..\binding\Binding\Binding.projitems*{bab615aa-956e-4079-b260-dd7b1f52ec7d}*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
{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
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|ARM.Build.0 = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|x64.ActiveCfg = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|x64.Build.0 = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|x86.ActiveCfg = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Debug|x86.Build.0 = Debug|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|Any CPU.Build.0 = Release|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|ARM.ActiveCfg = Release|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|ARM.Build.0 = Release|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|x64.ActiveCfg = Release|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|x64.Build.0 = Release|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|x86.ActiveCfg = Release|Any CPU
{BAB615AA-956E-4079-B260-DD7B1F52EC7D}.Release|x86.Build.0 = Release|Any CPU
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|Any CPU.ActiveCfg = Debug|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|Any CPU.Build.0 = Debug|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|Any CPU.Deploy.0 = Debug|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|ARM.ActiveCfg = Debug|ARM
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|ARM.Build.0 = Debug|ARM
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|ARM.Deploy.0 = Debug|ARM
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|x64.ActiveCfg = Debug|x64
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|x64.Build.0 = Debug|x64
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|x64.Deploy.0 = Debug|x64
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|x86.ActiveCfg = Debug|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|x86.Build.0 = Debug|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Debug|x86.Deploy.0 = Debug|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|Any CPU.ActiveCfg = Release|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|ARM.ActiveCfg = Release|ARM
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|ARM.Build.0 = Release|ARM
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|ARM.Deploy.0 = Release|ARM
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|x64.ActiveCfg = Release|x64
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|x64.Build.0 = Release|x64
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|x64.Deploy.0 = Release|x64
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|x86.ActiveCfg = Release|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|x86.Build.0 = Release|x86
{91B64285-C797-49FD-8252-EAD97BA38E27}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8BB20362-91A2-4206-944D-634070EAC6F3} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{5A67972C-1C04-4913-9950-06A03BFE9533} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{9C502B9A-25D4-473F-89BD-5A13DDE16354} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{BAB615AA-956E-4079-B260-DD7B1F52EC7D} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{6F8349DC-90AC-441D-8B8B-BE623F46BE6D} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {67EACD19-0CEA-4127-9842-549AA6FB84C9}
EndGlobalSection
EndGlobal

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

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

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

@ -0,0 +1,90 @@
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace SkiaSharpSample
{
/// <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()
{
InitializeComponent();
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)
{
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

Двоичные данные
samples/Basic/UWP/SkiaSharpSample/Assets/StoreLogo.png Normal file

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

После

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

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

После

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

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

@ -0,0 +1,14 @@
<Page
x:Class="SkiaSharpSample.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SkiaSharpSample"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:skia="using:SkiaSharp.Views.UWP"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<skia:SKXamlCanvas PaintSurface="OnPaintSurface" />
</Grid>
</Page>

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

@ -0,0 +1,45 @@
using Windows.Graphics.Display;
using Windows.UI.Xaml.Controls;
using SkiaSharp;
using SkiaSharp.Views.UWP;
namespace SkiaSharpSample
{
public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();
}
private void OnPaintSurface(object sender, SKPaintSurfaceEventArgs e)
{
// the the canvas and properties
var canvas = e.Surface.Canvas;
// get the screen density for scaling
var display = DisplayInformation.GetForCurrentView();
var scale = display.LogicalDpi / 96.0f;
var scaledSize = new SKSize(e.Info.Width / scale, e.Info.Height / scale);
// handle the device screen density
canvas.Scale(scale);
// make sure the canvas is blank
canvas.Clear(SKColors.White);
// draw some text
var paint = new SKPaint
{
Color = SKColors.Black,
IsAntialias = true,
Style = SKPaintStyle.Fill,
TextAlign = SKTextAlign.Center,
TextSize = 24
};
var coord = new SKPoint(scaledSize.Width / 2, (scaledSize.Height + paint.TextSize) / 2);
canvas.DrawText("SkiaSharp", coord, paint);
}
}
}

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

@ -0,0 +1,49 @@
<?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="4ea68495-7021-4fee-bd06-97d8253518bd"
Publisher="CN=mattl"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="4ea68495-7021-4fee-bd06-97d8253518bd" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>SkiaSharpSample</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="SkiaSharpSample.App">
<uap:VisualElements
DisplayName="SkiaSharpSample"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="SkiaSharpSample"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

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

@ -0,0 +1,29 @@
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("SkiaSharpSample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkiaSharpSample")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[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)]

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

@ -0,0 +1,31 @@
<!--
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 https://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" Serialize="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>

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

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.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>{91B64285-C797-49FD-8252-EAD97BA38E27}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SkiaSharpSample</RootNamespace>
<AssemblyName>SkiaSharpSample</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.10240.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<PackageCertificateKeyFile>SkiaSharpSample_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>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\binding\SkiaSharp.UWP\SkiaSharp.UWP.csproj">
<Project>{bab615aa-956e-4079-b260-dd7b1f52ec7d}</Project>
<Name>SkiaSharp.UWP</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.UWP\SkiaSharp.Views.UWP.csproj">
<Project>{8bb20362-91a2-4206-944d-634070eac6f3}</Project>
<Name>SkiaSharp.Views.UWP</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\..\output\native\uwp\$(Platform)\libSkiaSharp.dll" Condition="Exists('..\..\..\..\output\native\uwp\$(Platform)\libSkiaSharp.dll')" />
<Content Include="..\..\..\..\output\native\uwp\$(Platform)\libEGL.dll" Condition="Exists('..\..\..\..\output\native\uwp\$(Platform)\libEGL.dll')" />
<Content Include="..\..\..\..\output\native\uwp\$(Platform)\libGLESv2.dll" Condition="Exists('..\..\..\..\output\native\uwp\$(Platform)\libGLESv2.dll')" />
</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="SkiaSharpSample_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>
<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>

Двоичные данные
samples/Basic/UWP/SkiaSharpSample/SkiaSharpSample_TemporaryKey.pfx Normal file

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

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

@ -0,0 +1,67 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.Desktop", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Desktop\SkiaSharp.Views.Desktop.csproj", "{E5A90865-C185-45AD-88D1-6DA7D6004B03}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SkiaSharp.Views.Shared", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.shproj", "{5A67972C-1C04-4913-9950-06A03BFE9533}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding", "..\..\..\binding\Binding\Binding.shproj", "{9C502B9A-25D4-473F-89BD-5A13DDE16354}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Desktop", "..\..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj", "{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "source", "source", "{C335869B-7CC8-4239-B4A5-8031AA9758D3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Views.WPF", "..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.WPF\SkiaSharp.Views.WPF.csproj", "{743CF830-D458-41A9-865A-F85126562015}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Binding.Shared", "..\..\..\binding\Binding.Shared\Binding.Shared.shproj", "{6F8349DC-90AC-441D-8B8B-BE623F46BE6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharpSample", "SkiaSharpSample\SkiaSharpSample.csproj", "{2367CF57-8B62-40D9-B529-69CDC6C6B1F6}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{5a67972c-1c04-4913-9950-06a03bfe9533}*SharedItemsImports = 13
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{6f8349dc-90ac-441d-8b8b-be623f46be6d}*SharedItemsImports = 13
..\..\..\binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Shared\SkiaSharp.Views.Shared.projitems*{e5a90865-c185-45ad-88d1-6da7d6004b03}*SharedItemsImports = 4
..\..\..\binding\Binding.Shared\Binding.Shared.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
..\..\..\binding\Binding\Binding.projitems*{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5A90865-C185-45AD-88D1-6DA7D6004B03}.Release|Any CPU.Build.0 = Release|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF}.Release|Any CPU.Build.0 = Release|Any CPU
{743CF830-D458-41A9-865A-F85126562015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{743CF830-D458-41A9-865A-F85126562015}.Debug|Any CPU.Build.0 = Debug|Any CPU
{743CF830-D458-41A9-865A-F85126562015}.Release|Any CPU.ActiveCfg = Release|Any CPU
{743CF830-D458-41A9-865A-F85126562015}.Release|Any CPU.Build.0 = Release|Any CPU
{2367CF57-8B62-40D9-B529-69CDC6C6B1F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2367CF57-8B62-40D9-B529-69CDC6C6B1F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2367CF57-8B62-40D9-B529-69CDC6C6B1F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2367CF57-8B62-40D9-B529-69CDC6C6B1F6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E5A90865-C185-45AD-88D1-6DA7D6004B03} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{5A67972C-1C04-4913-9950-06A03BFE9533} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{9C502B9A-25D4-473F-89BD-5A13DDE16354} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{EB1BBDCC-FB07-40D5-8B9E-0079E2C2F2DF} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{743CF830-D458-41A9-865A-F85126562015} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
{6F8349DC-90AC-441D-8B8B-BE623F46BE6D} = {C335869B-7CC8-4239-B4A5-8031AA9758D3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {67EACD19-0CEA-4127-9842-549AA6FB84C9}
EndGlobalSection
EndGlobal

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

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

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

@ -0,0 +1,9 @@
<Application x:Class="SkiaSharpSample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SkiaSharpSample"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

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

@ -0,0 +1,8 @@
using System.Windows;
namespace SkiaSharpSample
{
public partial class App : Application
{
}
}

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

@ -0,0 +1,13 @@
<Window x:Class="SkiaSharpSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SkiaSharpSample"
xmlns:skia="clr-namespace:SkiaSharp.Views.WPF;assembly=SkiaSharp.Views.WPF"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<skia:SKElement PaintSurface="OnPaintSurface" />
</Grid>
</Window>

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

@ -0,0 +1,43 @@
using System.Windows;
using SkiaSharp;
using SkiaSharp.Views.Desktop;
namespace SkiaSharpSample
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void OnPaintSurface(object sender, SKPaintSurfaceEventArgs e)
{
// the the canvas and properties
var canvas = e.Surface.Canvas;
// get the screen density for scaling
var scale = (float)PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice.M11;
var scaledSize = new SKSize(e.Info.Width / scale, e.Info.Height / scale);
// handle the device screen density
canvas.Scale(scale);
// make sure the canvas is blank
canvas.Clear(SKColors.White);
// draw some text
var paint = new SKPaint
{
Color = SKColors.Black,
IsAntialias = true,
Style = SKPaintStyle.Fill,
TextAlign = SKTextAlign.Center,
TextSize = 24
};
var coord = new SKPoint(scaledSize.Width / 2, (scaledSize.Height + paint.TextSize) / 2);
canvas.DrawText("SkiaSharp", coord, paint);
}
}
}

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

@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 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("SkiaSharpSample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkiaSharpSample")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// 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")]

71
samples/Basic/WPF/SkiaSharpSample/Properties/Resources.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SkiaSharpSample.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SkiaSharpSample.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

30
samples/Basic/WPF/SkiaSharpSample/Properties/Settings.Designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SkiaSharpSample.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

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

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2367CF57-8B62-40D9-B529-69CDC6C6B1F6}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>SkiaSharpSample</RootNamespace>
<AssemblyName>SkiaSharpSample</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\binding\SkiaSharp.Desktop\SkiaSharp.Desktop.csproj">
<Project>{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}</Project>
<Name>SkiaSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Desktop\SkiaSharp.Views.Desktop.csproj">
<Project>{e5a90865-c185-45ad-88d1-6da7d6004b03}</Project>
<Name>SkiaSharp.Views.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.WPF\SkiaSharp.Views.WPF.csproj">
<Project>{743cf830-d458-41a9-865a-f85126562015}</Project>
<Name>SkiaSharp.Views.WPF</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets" Condition="Exists('..\..\..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\nuget\build\net45\SkiaSharp.Desktop.targets')" />
</Project>

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

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

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

@ -0,0 +1,27 @@
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
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;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
}
}

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

@ -0,0 +1,5 @@
<?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.SkiaSharpSample" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<application android:label="SkiaSharpSample.Android" android:icon="@drawable/icon" android:theme="@style/MainTheme"></application>
</manifest>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше