Merge branch 'master' into update-m56

This commit is contained in:
Matthew Leibowitz 2016-11-21 22:33:06 +02:00
Родитель e16acac9e1 540cd843b1
Коммит f6b87decd9
69 изменённых файлов: 1114 добавлений и 226 удалений

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

@ -91,7 +91,7 @@ namespace SkiaSharp
private uint color;
internal SKColor (uint value)
public SKColor (uint value)
{
color = value;
}
@ -103,7 +103,7 @@ namespace SkiaSharp
public SKColor (byte red, byte green, byte blue)
{
color = (uint)(0xff000000u | (red << 16) | (green << 8) | blue);
color = (0xff000000u | (uint)(red << 16) | (uint)(green << 8) | blue);
}
public SKColor WithRed (byte red)

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

@ -10,8 +10,8 @@ using System.Reflection;
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkiaSharp")]
[assembly: AssemblyVersion("1.55.0.0")]
[assembly: AssemblyFileVersion("1.55.0.0")]
[assembly: AssemblyInformationalVersion("1.55.0.0-{GIT_SHA}")]
[assembly: AssemblyFileVersion("1.55.1.0")]
[assembly: AssemblyInformationalVersion("1.55.1.0-{GIT_SHA}")]
[assembly: AssemblyCopyright("Xamarin Inc.")]
[assembly: AssemblyTrademark("")]

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

@ -232,9 +232,6 @@ namespace SkiaSharp
public void SetPixels(IntPtr pixels, SKColorTable ct)
{
if (ColorType != SKColorType.Index8) {
throw new NotSupportedException (UnsupportedColorTypeMessage);
}
SkiaApi.sk_bitmap_set_pixels (Handle, pixels, ct != null ? ct.Handle : IntPtr.Zero);
}
@ -245,15 +242,12 @@ namespace SkiaSharp
public byte[] Bytes {
get {
LockPixels ();
try {
using (new SKAutoLockPixels (this)) {
IntPtr length;
var pixelsPtr = GetPixels (out length);
byte [] bytes = new byte [(int)length];
Marshal.Copy (pixelsPtr, bytes, 0, (int)length);
return bytes;
} finally {
UnlockPixels ();
}
}
}

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

@ -135,11 +135,6 @@ namespace SkiaSharp
WeakReference reference;
if (instances.TryGetValue(handle, out reference))
{
var shouldRemove =
reference == null ||
reference.Target == null ||
reference.Target == instance;
// remove it if it is dead or the correct object
instances.Remove(handle);
}

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

@ -470,12 +470,12 @@ Task ("set-versions")
// the versions
var version = "1.55.0.0";
var fileVersion = "1.55.0.0";
var fileVersion = "1.55.1.0";
var versions = new Dictionary<string, string> {
{ "SkiaSharp", "1.55.0" },
{ "SkiaSharp.Views", "1.55.0" },
{ "SkiaSharp.Views.Forms", "1.55.0" },
{ "SkiaSharp.Svg", "1.55.0-beta1" },
{ "SkiaSharp", "1.55.1" },
{ "SkiaSharp.Views", "1.55.1" },
{ "SkiaSharp.Views.Forms", "1.55.1" },
{ "SkiaSharp.Svg", "1.55.1-beta1" },
};
var files = new List<string> ();

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

@ -27,7 +27,7 @@
<example>
<code lang="C#"><![CDATA[SKCanvas canvas = ...;
using (new SKAutoCanvasRestore(canvas, true)) {
using (new SKAutoCanvasRestore(canvas)) {
// perform some transform
canvas.RotateDegrees(45);
@ -42,6 +42,24 @@ using (new SKAutoCanvasRestore(canvas, true)) {
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SKAutoCanvasRestore (SkiaSharp.SKCanvas canvas);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class SkiaSharp.SKCanvas canvas) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="canvas" Type="SkiaSharp.SKCanvas" />
</Parameters>
<Docs>
<param name="canvas">The canvas whose state will be preserved.</param>
<summary>Creates a canvas restore point, invoking the <see cref="M:SkiaSharp.SKCanvas.Save" /> method.</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SKAutoCanvasRestore (SkiaSharp.SKCanvas canvas, bool doSave);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class SkiaSharp.SKCanvas canvas, bool doSave) cil managed" />
@ -60,8 +78,8 @@ using (new SKAutoCanvasRestore(canvas, true)) {
<Parameter Name="doSave" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="canvas">The canvas whose state will be preserved</param>
<param name="doSave">Determines whether you want the <see cref="M:SkiaSharp.SKCanvas.Save" /> method to be invoked on your behalf at this point.</param>
<param name="canvas">The canvas whose state will be preserved.</param>
<param name="doSave">Whether or not to invoke <see cref="M:SkiaSharp.SKCanvas.Save" /> method at this point.</param>
<summary>Creates a canvas restore point.</summary>
<remarks>
<para></para>
@ -86,7 +104,10 @@ using (new SKAutoCanvasRestore(canvas, true)) {
</ReturnValue>
<Parameters />
<Docs>
<summary>Disposes the canvas restore point, restoring the state of the canvas (matrix, clip and draw filter) to the state it was when the object was created.  This operation will not do anything if you had previously manually called the <see cref="M:SkiaSharp.SKAutoCanvasRestore.Restore" /> method.</summary>
<summary>
<para>Disposes the canvas restore point, restoring the state of the canvas (matrix, clip and draw filter) to the state it was when the object was created.</para>
<para>This operation will not do anything if you had previously manually called the <see cref="M:SkiaSharp.SKAutoCanvasRestore.Restore" /> method.</para>
</summary>
<remarks>
<para></para>
</remarks>

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

@ -0,0 +1,115 @@
<Type Name="SKAutoLockPixels" FullName="SkiaSharp.SKAutoLockPixels">
<TypeSignature Language="C#" Value="public class SKAutoLockPixels : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit SKAutoLockPixels extends System.Object implements class System.IDisposable" />
<AssemblyInfo>
<AssemblyName>SkiaSharp</AssemblyName>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Convenience class used to lock and unlock the bitmap pixels in a using statement.</summary>
<remarks>
<para>This class can be used in a using statement to lock the pixels of the bitmap allowing you to read those pixels. The pixels are automatically unlocked by virtue of having the <see cref="M:SkiaSharp.SKAutoLockPixels.Dispose" /> method unlock the bitmap pixels.</para>
<para></para>
<example>
<code lang="C#"><![CDATA[SKBitmap bitmap = ...;
using (new SKAutoLockPixels(bitmap)) {
// get a pointer to the pixels
bitmap.GetPixels();
// use the pointer
// automatically unlock the pixels
}]]></code>
</example>
<para></para>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SKAutoLockPixels (SkiaSharp.SKBitmap bitmap);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class SkiaSharp.SKBitmap bitmap) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="bitmap" Type="SkiaSharp.SKBitmap" />
</Parameters>
<Docs>
<param name="bitmap">The bitmap whose pixels to lock.</param>
<summary>Lock the bitmaps pixels.</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SKAutoLockPixels (SkiaSharp.SKBitmap bitmap, bool doLock);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class SkiaSharp.SKBitmap bitmap, bool doLock) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="bitmap" Type="SkiaSharp.SKBitmap" />
<Parameter Name="doLock" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="bitmap">The bitmap whose pixels to lock.</param>
<param name="doLock">Whether or not to invoke <see cref="M:SkiaSharp.SKBitmap.LockPixels" /> method at this point.</param>
<summary>Lock the bitmaps pixels.</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Disposes the pixel locker, unlocking the pixels of the bitmap. </para>
<para>This operation will not do anything if you had previously manually called the <see cref="M:SkiaSharp.SKAutoLockPixels.Unlock" /> method.</para>
</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="Unlock">
<MemberSignature Language="C#" Value="public void Unlock ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Unlock() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Unlocks the pixels of the bitmap.</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
</Members>
</Type>

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

@ -385,6 +385,32 @@
</remarks>
</Docs>
</Member>
<Member MemberName="CopyPixelsTo">
<MemberSignature Language="C#" Value="public bool CopyPixelsTo (IntPtr dst, int dstSize, int dstRowBytes = 0, bool preserveDstPad = false);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool CopyPixelsTo(native int dst, int32 dstSize, int32 dstRowBytes, bool preserveDstPad) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dst" Type="System.IntPtr" />
<Parameter Name="dstSize" Type="System.Int32" />
<Parameter Name="dstRowBytes" Type="System.Int32" />
<Parameter Name="preserveDstPad" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="dst">The location of destination buffer.</param>
<param name="dstSize">The size of destination buffer. Must be large enough to hold pixels using indicated stride.</param>
<param name="dstRowBytes">The width of each line in the buffer. If 0, uses bitmap's internal stride.</param>
<param name="preserveDstPad">Whether or not to preserve padding in the destination.</param>
<summary>Copies the pixels of the bitmap to the specified memory location.</summary>
<returns>Returns true if possible, returns false otherwise.</returns>
<remarks>In the case when the <paramref name="dstRowBytes" /> matches the bitmap's <paramref name="rowBytes" />, the copy may be made faster by copying over the <paramref name="dst" />'s per-row padding (for all rows but the last). By setting <paramref name="preserveDstPad" /> to true the caller can disable this optimization and ensure that pixels in the padding are not overwritten.</remarks>
</Docs>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public bool CopyTo (SkiaSharp.SKBitmap destination);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool CopyTo(class SkiaSharp.SKBitmap destination) cil managed" />
@ -953,6 +979,25 @@
<remarks>In most cases this will require un-premultiplying the color.</remarks>
</Docs>
</Member>
<Member MemberName="GetPixels">
<MemberSignature Language="C#" Value="public IntPtr GetPixels ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance native int GetPixels() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the address of the pixels for this bitmap.</summary>
<returns>Returns a pointer to the region that contains the pixel data for this bitmap. This might return <see langword="IntPtr.Zero" /> if there is no pixel buffer associated with this bitmap.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="GetPixels">
<MemberSignature Language="C#" Value="public IntPtr GetPixels (out IntPtr length);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance native int GetPixels(native int length) cil managed" />
@ -1033,6 +1078,116 @@
</remarks>
</Docs>
</Member>
<Member MemberName="InstallPixels">
<MemberSignature Language="C#" Value="public bool InstallPixels (SkiaSharp.SKImageInfo info, IntPtr pixels);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool InstallPixels(valuetype SkiaSharp.SKImageInfo info, native int pixels) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="info">The image information describing the pixels.</param>
<param name="pixels">The pixels to install.</param>
<summary>Installs the specified pixels into the bitmap.</summary>
<returns>Returns true on success, or false on failure. If there was an error, the bitmap will be set to empty.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="InstallPixels">
<MemberSignature Language="C#" Value="public bool InstallPixels (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool InstallPixels(valuetype SkiaSharp.SKImageInfo info, native int pixels, int32 rowBytes) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
<Parameter Name="rowBytes" Type="System.Int32" />
</Parameters>
<Docs>
<param name="info">The image information describing the pixels.</param>
<param name="pixels">The pixels to install.</param>
<param name="rowBytes">The stride of the pixels being installed.</param>
<summary>Installs the specified pixels into the bitmap.</summary>
<returns>Returns true on success, or false on failure. If there was an error, the bitmap will be set to empty.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="InstallPixels">
<MemberSignature Language="C#" Value="public bool InstallPixels (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKColorTable ctable);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool InstallPixels(valuetype SkiaSharp.SKImageInfo info, native int pixels, int32 rowBytes, class SkiaSharp.SKColorTable ctable) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
<Parameter Name="rowBytes" Type="System.Int32" />
<Parameter Name="ctable" Type="SkiaSharp.SKColorTable" />
</Parameters>
<Docs>
<param name="info">The image information describing the pixels.</param>
<param name="pixels">The pixels to install.</param>
<param name="rowBytes">The stride of the pixels being installed.</param>
<param name="ctable">The color table to use, if installing <see cref="F:SkiaSharp.SKColorType.Index8" /> pixels.</param>
<summary>Installs the specified pixels into the bitmap.</summary>
<returns>Returns true on success, or false on failure. If there was an error, the bitmap will be set to empty.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="InstallPixels">
<MemberSignature Language="C#" Value="public bool InstallPixels (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKColorTable ctable, SkiaSharp.SKBitmapReleaseDelegate releaseProc, object context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool InstallPixels(valuetype SkiaSharp.SKImageInfo info, native int pixels, int32 rowBytes, class SkiaSharp.SKColorTable ctable, class SkiaSharp.SKBitmapReleaseDelegate releaseProc, object context) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
<Parameter Name="rowBytes" Type="System.Int32" />
<Parameter Name="ctable" Type="SkiaSharp.SKColorTable" />
<Parameter Name="releaseProc" Type="SkiaSharp.SKBitmapReleaseDelegate" />
<Parameter Name="context" Type="System.Object" />
</Parameters>
<Docs>
<param name="info">The image information describing the pixels.</param>
<param name="pixels">The pixels to install.</param>
<param name="rowBytes">The stride of the pixels being installed.</param>
<param name="ctable">The color table to use, if installing <see cref="F:SkiaSharp.SKColorType.Index8" /> pixels.</param>
<param name="releaseProc">The delegate to invoke when the pixels are no longer referenced.</param>
<param name="context">The user data to use when invoking the delegate.</param>
<summary>Installs the specified pixels into the bitmap.</summary>
<returns>Returns true on success, or false on failure. If there was an error, the bitmap will be set to empty.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="IsEmpty">
<MemberSignature Language="C#" Value="public bool IsEmpty { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsEmpty" />
@ -1147,7 +1302,7 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>Call this to ensure that the bitmap points to the current pixel address in the pixelref. </summary>
<summary>Call this to ensure that the bitmap points to the current pixel address in the pixelref.</summary>
<remarks>
<para>This allows pixelrefs that implement cached/deferred image decoding to know when there are active clients of a given image.</para>
<para>Balance it with a call to <see cref="M:SkiaSharp.SKBitmap.UnlockPixels" />. These calls are harmless if there is no pixelref.</para>
@ -1172,6 +1327,26 @@
</ReturnValue>
<Docs>
<summary>Gets all the pixels as an array of colors.</summary>
<value>
<para></para>
</value>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="ReadyToDraw">
<MemberSignature Language="C#" Value="public bool ReadyToDraw { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ReadyToDraw" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether or not the bitmap is valid enough to be drawn.</summary>
<value>
<para />
</value>
@ -1221,8 +1396,7 @@
<Docs>
<summary>The number of bytes per row.</summary>
<value>
<para>
</para>
<para></para>
</value>
<remarks>The same as <see cref="P:SkiaSharp.SKImageInfo.RowBytes" />.</remarks>
</Docs>
@ -1241,9 +1415,11 @@
<Parameter Name="ct" Type="SkiaSharp.SKColorTable" />
</Parameters>
<Docs>
<param name="ct">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<param name="ct">The new color table.</param>
<summary>Replaces the current color table of the bitmap.</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="SetImmutable">
@ -1311,13 +1487,15 @@
<Parameter Name="pixels" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="pixels">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<param name="pixels">The new pixel address.</param>
<summary>Replaces the current pixel address for the bitmap.</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="SetPixels">
<MemberSignature Language="C#" Value="public void SetPixels (IntPtr pixels, SkiaSharp.SKColorTable ct = null);" />
<MemberSignature Language="C#" Value="public void SetPixels (IntPtr pixels, SkiaSharp.SKColorTable ct);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetPixels(native int pixels, class SkiaSharp.SKColorTable ct) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
@ -1331,10 +1509,12 @@
<Parameter Name="ct" Type="SkiaSharp.SKColorTable" />
</Parameters>
<Docs>
<param name="pixels">To be added.</param>
<param name="ct">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<param name="pixels">The new pixel address.</param>
<param name="ct">The color table to use, if changing <see cref="F:SkiaSharp.SKColorType.Index8" /> pixels, or <see langword="null" />.</param>
<summary>Replaces the current pixel address for the bitmap.</summary>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="UnlockPixels">

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

@ -0,0 +1,26 @@
<Type Name="SKBitmapReleaseDelegate" FullName="SkiaSharp.SKBitmapReleaseDelegate">
<TypeSignature Language="C#" Value="public delegate void SKBitmapReleaseDelegate(IntPtr address, object context);" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed SKBitmapReleaseDelegate extends System.MulticastDelegate" />
<AssemblyInfo>
<AssemblyName>SkiaSharp</AssemblyName>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Parameters>
<Parameter Name="address" Type="System.IntPtr" />
<Parameter Name="context" Type="System.Object" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="address">The memory address of the pixels being released.</param>
<param name="context">The user data that was provided when installing the pixels.</param>
<summary>The delegate that is used when releasing the memory for a bitmap.</summary>
<remarks>
<para />
</remarks>
</Docs>
</Type>

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

@ -369,7 +369,7 @@
<param name="operation">The region operator to apply to the current clip.</param>
<summary>Modify the current clip with the specified region.</summary>
<remarks>
<para />
<para></para>
</remarks>
</Docs>
</Member>
@ -1187,6 +1187,58 @@
</remarks>
</Docs>
</Member>
<Member MemberName="DrawPositionedText">
<MemberSignature Language="C#" Value="public void DrawPositionedText (string text, SkiaSharp.SKPoint[] points, SkiaSharp.SKPaint paint);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawPositionedText(string text, valuetype SkiaSharp.SKPoint[] points, class SkiaSharp.SKPaint paint) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
<Parameter Name="points" Type="SkiaSharp.SKPoint[]" />
<Parameter Name="paint" Type="SkiaSharp.SKPaint" />
</Parameters>
<Docs>
<param name="text">The text to draw.</param>
<param name="points">The positions for each glyph in the <paramref name="text" /> string.</param>
<param name="paint">The paint used to draw the text.</param>
<summary>Draws glyphs of the text at specified locations on the canvas.</summary>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="DrawPositionedText">
<MemberSignature Language="C#" Value="public void DrawPositionedText (IntPtr buffer, int length, SkiaSharp.SKPoint[] points, SkiaSharp.SKPaint paint);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawPositionedText(native int buffer, int32 length, valuetype SkiaSharp.SKPoint[] points, class SkiaSharp.SKPaint paint) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="buffer" Type="System.IntPtr" />
<Parameter Name="length" Type="System.Int32" />
<Parameter Name="points" Type="SkiaSharp.SKPoint[]" />
<Parameter Name="paint" Type="SkiaSharp.SKPaint" />
</Parameters>
<Docs>
<param name="buffer">The pointer to a region holding UTF-8 encoded text to draw.</param>
<param name="length">The number of bytes to read from the <paramref name="buffer." /></param>
<param name="points">The positions for each glyph in the <paramref name="buffer." /></param>
<param name="paint">The paint used to draw the text.</param>
<summary>Draws text from a UTF-8 buffer at specified locations on the canvas.</summary>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="DrawRect">
<MemberSignature Language="C#" Value="public void DrawRect (SkiaSharp.SKRect rect, SkiaSharp.SKPaint paint);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawRect(valuetype SkiaSharp.SKRect rect, class SkiaSharp.SKPaint paint) cil managed" />
@ -1216,6 +1268,29 @@
</remarks>
</Docs>
</Member>
<Member MemberName="DrawRegion">
<MemberSignature Language="C#" Value="public void DrawRegion (SkiaSharp.SKRegion region, SkiaSharp.SKPaint paint);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawRegion(class SkiaSharp.SKRegion region, class SkiaSharp.SKPaint paint) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="region" Type="SkiaSharp.SKRegion" />
<Parameter Name="paint" Type="SkiaSharp.SKPaint" />
</Parameters>
<Docs>
<param name="region">The region to be drawn.</param>
<param name="paint">The paint used to draw the region.</param>
<summary>Draws the outline of the specified region using the specified paint.</summary>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="DrawRoundRect">
<MemberSignature Language="C#" Value="public void DrawRoundRect (SkiaSharp.SKRect rect, float rx, float ry, SkiaSharp.SKPaint paint);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void DrawRoundRect(valuetype SkiaSharp.SKRect rect, float32 rx, float32 ry, class SkiaSharp.SKPaint paint) cil managed" />
@ -1261,6 +1336,11 @@
<AssemblyVersion>1.54.0.0</AssemblyVersion>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("Use DrawPositionedText instead.")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
@ -1292,6 +1372,11 @@
<AssemblyVersion>1.54.0.0</AssemblyVersion>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("Use DrawPositionedText instead.")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
@ -1403,8 +1488,8 @@
<Parameter Name="paint" Type="SkiaSharp.SKPaint" />
</Parameters>
<Docs>
<param name="buffer">Contains a pointer to a region holding UTF-8 encoded text to draw.</param>
<param name="length">Number of bytes to read from the <paramref name="buffer." /></param>
<param name="buffer">The pointer to a region holding UTF-8 encoded text to draw.</param>
<param name="length">The number of bytes to read from the <paramref name="buffer." /></param>
<param name="x">The x-coordinate of the origin of the text being drawn.</param>
<param name="y">The y-coordinate of the origin of the text being drawn.</param>
<param name="paint">The paint used to draw the text.</param>
@ -1474,8 +1559,8 @@
<Parameter Name="paint" Type="SkiaSharp.SKPaint" />
</Parameters>
<Docs>
<param name="buffer">Contains a pointer to a region holding UTF-8 encoded text to draw.</param>
<param name="length">Number of bytes to read from the <paramref name="buffer." /></param>
<param name="buffer">The pointer to a region holding UTF-8 encoded text to draw.</param>
<param name="length">The number of bytes to read from the <paramref name="buffer." /></param>
<param name="path">The path the text should follow for its baseline.</param>
<param name="hOffset">The distance along the path to add to the texts starting position.</param>
<param name="vOffset">The distance above (-) or below (+) the path to position the text.</param>
@ -1556,6 +1641,46 @@
</remarks>
</Docs>
</Member>
<Member MemberName="QuickReject">
<MemberSignature Language="C#" Value="public bool QuickReject (SkiaSharp.SKPath path);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool QuickReject(class SkiaSharp.SKPath path) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="path" Type="SkiaSharp.SKPath" />
</Parameters>
<Docs>
<param name="path">The path to compare with the current clip.</param>
<summary>Checks to see if the specified path, after being transformed by the current matrix, would lie completely outside of the current clip.</summary>
<returns>Returns true if the path (transformed by the canvas' matrix) does not intersect with the canvas clip.</returns>
<remarks>Call this to check if an area you intend to draw into is clipped out (and therefore you can skip making the draw calls).</remarks>
</Docs>
</Member>
<Member MemberName="QuickReject">
<MemberSignature Language="C#" Value="public bool QuickReject (SkiaSharp.SKRect rect);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool QuickReject(valuetype SkiaSharp.SKRect rect) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rect" Type="SkiaSharp.SKRect" />
</Parameters>
<Docs>
<param name="rect">The rectangle to compare with the current clip.</param>
<summary>Checks to see if the specified rectangle, after being transformed by the current matrix, would lie completely outside of the current clip.</summary>
<returns>Returns true if the rectangle (transformed by the canvas' matrix) does not intersect with the canvas clip.</returns>
<remarks>Call this to check if an area you intend to draw into is clipped out (and therefore you can skip making the draw calls).</remarks>
</Docs>
</Member>
<Member MemberName="ResetMatrix">
<MemberSignature Language="C#" Value="public void ResetMatrix ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void ResetMatrix() cil managed" />

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

@ -494,6 +494,43 @@
</remarks>
</Docs>
</Member>
<Member MemberName="IncrementalDecode">
<MemberSignature Language="C#" Value="public SkiaSharp.SKCodecResult IncrementalDecode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype SkiaSharp.SKCodecResult IncrementalDecode() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKCodecResult</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Start or continue the incremental decode.</summary>
<returns>Returns <see cref="F:SkiaSharp.SKCodecResult.Success" /> if all lines requested in <see cref="M:SkiaSharp.SKCodec.StartIncrementalDecode" /> have been completely decoded. <see cref="F:SkiaSharp.SKCodecResult.IncompleteInput" /> otherwise.</returns>
<remarks>Unlike <see cref="M:SkiaSharp.SKCodec.GetPixels" />, this does not do any filling. This is left up to the caller, since they may be skipping lines or continuing the decode later.</remarks>
</Docs>
</Member>
<Member MemberName="IncrementalDecode">
<MemberSignature Language="C#" Value="public SkiaSharp.SKCodecResult IncrementalDecode (out int rowsDecoded);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype SkiaSharp.SKCodecResult IncrementalDecode(int32 rowsDecoded) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKCodecResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rowsDecoded" Type="System.Int32&amp;" RefType="out" />
</Parameters>
<Docs>
<param name="rowsDecoded">The total number of lines initialized. Only meaningful if this method returns <see cref="F:SkiaSharp.SKCodecResult.IncompleteInput" />.</param>
<summary>Start or continue the incremental decode.</summary>
<returns>Returns <see cref="F:SkiaSharp.SKCodecResult.Success" /> if all lines requested in <see cref="M:SkiaSharp.SKCodec.StartIncrementalDecode" /> have been completely decoded. <see cref="F:SkiaSharp.SKCodecResult.IncompleteInput" /> otherwise.</returns>
<remarks>Unlike <see cref="M:SkiaSharp.SKCodec.GetPixels" />, this does not do any filling. This is left up to the caller, since they may be skipping lines or continuing the decode later.</remarks>
</Docs>
</Member>
<Member MemberName="Info">
<MemberSignature Language="C#" Value="public SkiaSharp.SKImageInfo Info { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype SkiaSharp.SKImageInfo Info" />
@ -590,5 +627,123 @@
</remarks>
</Docs>
</Member>
<Member MemberName="StartIncrementalDecode">
<MemberSignature Language="C#" Value="public SkiaSharp.SKCodecResult StartIncrementalDecode (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype SkiaSharp.SKCodecResult StartIncrementalDecode(valuetype SkiaSharp.SKImageInfo info, native int pixels, int32 rowBytes) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKCodecResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
<Parameter Name="rowBytes" Type="System.Int32" />
</Parameters>
<Docs>
<param name="info">The image information of the destination. If the dimensions do not match those of <see cref="P:SkiaSharp.SKCodec.Info" />, this implies a scale.</param>
<param name="pixels">The memory to write to. Needs to be large enough to hold the subset, if present, or the full image.</param>
<param name="rowBytes">The stride of the memory to write to.</param>
<summary>Prepare for an incremental decode with the specified options.</summary>
<returns>Returns <see cref="F:SkiaSharp.SKCodecResult.Success" /> on success, or another value explaining the type of failure.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="StartIncrementalDecode">
<MemberSignature Language="C#" Value="public SkiaSharp.SKCodecResult StartIncrementalDecode (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKCodecOptions options);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype SkiaSharp.SKCodecResult StartIncrementalDecode(valuetype SkiaSharp.SKImageInfo info, native int pixels, int32 rowBytes, valuetype SkiaSharp.SKCodecOptions options) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKCodecResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
<Parameter Name="rowBytes" Type="System.Int32" />
<Parameter Name="options" Type="SkiaSharp.SKCodecOptions" />
</Parameters>
<Docs>
<param name="info">The image information of the destination. If the dimensions do not match those of <see cref="P:SkiaSharp.SKCodec.Info" />, this implies a scale.</param>
<param name="pixels">The memory to write to. Needs to be large enough to hold the subset, if present, or the full image.</param>
<param name="rowBytes">The stride of the memory to write to.</param>
<param name="options">The decoding options, including if memory is zero initialized and whether to decode a subset.</param>
<summary>Prepare for an incremental decode with the specified options.</summary>
<returns>Returns <see cref="F:SkiaSharp.SKCodecResult.Success" /> on success, or another value explaining the type of failure.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="StartIncrementalDecode">
<MemberSignature Language="C#" Value="public SkiaSharp.SKCodecResult StartIncrementalDecode (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKCodecOptions options, SkiaSharp.SKColorTable colorTable, ref int colorTableCount);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype SkiaSharp.SKCodecResult StartIncrementalDecode(valuetype SkiaSharp.SKImageInfo info, native int pixels, int32 rowBytes, valuetype SkiaSharp.SKCodecOptions options, class SkiaSharp.SKColorTable colorTable, int32 colorTableCount) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKCodecResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
<Parameter Name="rowBytes" Type="System.Int32" />
<Parameter Name="options" Type="SkiaSharp.SKCodecOptions" />
<Parameter Name="colorTable" Type="SkiaSharp.SKColorTable" />
<Parameter Name="colorTableCount" Type="System.Int32&amp;" RefType="ref" />
</Parameters>
<Docs>
<param name="info">The image information of the destination. If the dimensions do not match those of <see cref="P:SkiaSharp.SKCodec.Info" />, this implies a scale.</param>
<param name="pixels">The memory to write to. Needs to be large enough to hold the subset, if present, or the full image.</param>
<param name="rowBytes">The stride of the memory to write to.</param>
<param name="options">The decoding options, including if memory is zero initialized and whether to decode a subset.</param>
<param name="colorTable">The color table to use.</param>
<param name="colorTableCount">The size of the color table.</param>
<summary>Prepare for an incremental decode with the specified options.</summary>
<returns>Returns <see cref="F:SkiaSharp.SKCodecResult.Success" /> on success, or another value explaining the type of failure.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="StartIncrementalDecode">
<MemberSignature Language="C#" Value="public SkiaSharp.SKCodecResult StartIncrementalDecode (SkiaSharp.SKImageInfo info, IntPtr pixels, int rowBytes, SkiaSharp.SKCodecOptions options, IntPtr colorTable, ref int colorTableCount);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype SkiaSharp.SKCodecResult StartIncrementalDecode(valuetype SkiaSharp.SKImageInfo info, native int pixels, int32 rowBytes, valuetype SkiaSharp.SKCodecOptions options, native int colorTable, int32 colorTableCount) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKCodecResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="SkiaSharp.SKImageInfo" />
<Parameter Name="pixels" Type="System.IntPtr" />
<Parameter Name="rowBytes" Type="System.Int32" />
<Parameter Name="options" Type="SkiaSharp.SKCodecOptions" />
<Parameter Name="colorTable" Type="System.IntPtr" />
<Parameter Name="colorTableCount" Type="System.Int32&amp;" RefType="ref" />
</Parameters>
<Docs>
<param name="info">The image information of the destination. If the dimensions do not match those of <see cref="P:SkiaSharp.SKCodec.Info" />, this implies a scale.</param>
<param name="pixels">The memory to write to. Needs to be large enough to hold the subset, if present, or the full image.</param>
<param name="rowBytes">The stride of the memory to write to.</param>
<param name="options">The decoding options, including if memory is zero initialized and whether to decode a subset.</param>
<param name="colorTable">The pointer to the color table to use.</param>
<param name="colorTableCount">The size of the color table.</param>
<summary>Prepare for an incremental decode with the specified options.</summary>
<returns>Returns <see cref="F:SkiaSharp.SKCodecResult.Success" /> on success, or another value explaining the type of failure.</returns>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
</Members>
</Type>

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

@ -20,6 +20,24 @@
<remarks>The color components are always in a known order.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SKColor (uint value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(unsigned int32 value) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="value" Type="System.UInt32" />
</Parameters>
<Docs>
<param name="value">The integer value of the color.</param>
<summary>Creates a color from the specified integer.</summary>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SKColor (byte red, byte green, byte blue);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(unsigned int8 red, unsigned int8 green, unsigned int8 blue) cil managed" />

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

@ -38,6 +38,28 @@
</remarks>
</Docs>
</Member>
<Member MemberName="CreateBlendMode">
<MemberSignature Language="C#" Value="public static SkiaSharp.SKColorFilter CreateBlendMode (SkiaSharp.SKColor c, SkiaSharp.SKBlendMode mode);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class SkiaSharp.SKColorFilter CreateBlendMode(valuetype SkiaSharp.SKColor c, valuetype SkiaSharp.SKBlendMode mode) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKColorFilter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="c" Type="SkiaSharp.SKColor" />
<Parameter Name="mode" Type="SkiaSharp.SKBlendMode" />
</Parameters>
<Docs>
<param name="c">The source color used with the specified mode.</param>
<param name="mode">The blend mode mode that is applied to each color.</param>
<summary>Creates a new color filter that uses the specified color and mode.</summary>
<returns>Returns the new <see cref="T:SkiaSharp.SKColorFilter" />, or <see langword="null" /> if the mode will have no effect.</returns>
<remarks>If the <paramref name="mode" /> is <see cref="F:SkiaSharp.SKBlendMode.Dst" />, this function will return <see langword="null" /> (since that mode will have no effect on the result).</remarks>
</Docs>
</Member>
<Member MemberName="CreateColorCube">
<MemberSignature Language="C#" Value="public static SkiaSharp.SKColorFilter CreateColorCube (SkiaSharp.SKData cubeData, int cubeDimension);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class SkiaSharp.SKColorFilter CreateColorCube(class SkiaSharp.SKData cubeData, int32 cubeDimension) cil managed" />

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

@ -168,6 +168,32 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public SkiaSharp.SKColor this[int index] { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype SkiaSharp.SKColor Item(int32)" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>SkiaSharp.SKColor</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">
<para />
</param>
<summary>Gets the premultiplied color at the specified index.</summary>
<value>
<para />
</value>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="MaxLength">
<MemberSignature Language="C#" Value="public const int MaxLength = 256;" />
<MemberSignature Language="ILAsm" Value=".field public static literal int32 MaxLength = (256)" />

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

@ -114,10 +114,30 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>Wraps the <see cref="T:SkiaSharp.SKData" /> as a <see cref="T:System.IO.Stream" /></summary>
<returns>
<summary>Wraps the <see cref="T:SkiaSharp.SKData" /> as a <see cref="T:System.IO.Stream" />.</summary>
<returns>Returns the new <see cref="T:System.IO.Stream" />.</returns>
<remarks>
<para></para>
</returns>
</remarks>
</Docs>
</Member>
<Member MemberName="AsStream">
<MemberSignature Language="C#" Value="public System.IO.Stream AsStream (bool streamDisposesData);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IO.Stream AsStream(bool streamDisposesData) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="streamDisposesData" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="streamDisposesData">Whether or not to dispose the data object when the stream is disposed.</param>
<summary>Wraps the <see cref="T:SkiaSharp.SKData" /> as a <see cref="T:System.IO.Stream" />.</summary>
<returns>Returns the new <see cref="T:System.IO.Stream" />.</returns>
<remarks>
<para></para>
</remarks>
@ -204,6 +224,26 @@
<remarks>When this SKData is cleared, the free method will be called on the provided buffer.</remarks>
</Docs>
</Member>
<Member MemberName="IsEmpty">
<MemberSignature Language="C#" Value="public bool IsEmpty { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsEmpty" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether or not the data is empty.</summary>
<value>
<para />
</value>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="SaveTo">
<MemberSignature Language="C#" Value="public void SaveTo (System.IO.Stream target);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SaveTo(class System.IO.Stream target) cil managed" />
@ -289,5 +329,24 @@
</remarks>
</Docs>
</Member>
<Member MemberName="ToArray">
<MemberSignature Language="C#" Value="public byte[] ToArray ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance unsigned int8[] ToArray() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Copies the data object into a byte array.</summary>
<returns>Returns the byte array of the data.</returns>
<remarks>
<para />
</remarks>
</Docs>
</Member>
</Members>
</Type>

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

@ -1033,6 +1033,26 @@
<remarks>If it is currently unknown, then this function will attempt to compute the convexity (and cache the result).</remarks>
</Docs>
</Member>
<Member MemberName="IsEmpty">
<MemberSignature Language="C#" Value="public bool IsEmpty { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsEmpty" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether or not the path is empty (contains no lines or curves).</summary>
<value>
<para />
</value>
<remarks>
<para />
</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public SkiaSharp.SKPoint this[int index] { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype SkiaSharp.SKPoint Item(int32)" />
@ -1307,7 +1327,9 @@
</ReturnValue>
<Docs>
<summary>Gets the number of points on the path.</summary>
<value>The number of points on the path.</value>
<value>
<para />
</value>
<remarks />
</Docs>
</Member>
@ -1852,5 +1874,25 @@
</remarks>
</Docs>
</Member>
<Member MemberName="VerbCount">
<MemberSignature Language="C#" Value="public int VerbCount { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 VerbCount" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.55.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of verbs in the path.</summary>
<value>
<para />
</value>
<remarks>
<para />
</remarks>
</Docs>
</Member>
</Members>
</Type>

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

@ -1 +1 @@
Subproject commit 7da798be1060e555f973905519d526dcbd6f7f88
Subproject commit 174c2933822f58dfc08ad7767f3b0da7827759c0

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

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

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Svg</id>
<title>SVG Support for SkiaSharp</title>
<version>1.55.0-beta1</version>
<version>1.55.1-beta1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -13,7 +13,7 @@
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<dependencies>
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
</dependencies>
</metadata>
<files>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views.Forms</id>
<title>SkiaSharp for Xamarin.Forms (for macOS)</title>
<version>1.55.0</version>
<version>1.55.1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -15,17 +15,17 @@
<dependencies>
<group>
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
</group>
<group targetFramework="MonoAndroid">
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp.Views" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
<dependency id="SkiaSharp.Views" version="1.55.1" />
</group>
<group targetFramework="XamariniOS">
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp.Views" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
<dependency id="SkiaSharp.Views" version="1.55.1" />
</group>
</dependencies>
</metadata>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views.Forms</id>
<title>SkiaSharp for Xamarin.Forms (for Windows)</title>
<version>1.55.0</version>
<version>1.55.1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -15,12 +15,12 @@
<dependencies>
<group>
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
</group>
<group targetFramework="uap10.0">
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp.Views" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
<dependency id="SkiaSharp.Views" version="1.55.1" />
</group>
</dependencies>
</metadata>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views.Forms</id>
<title>SkiaSharp for Xamarin.Forms</title>
<version>1.55.0</version>
<version>1.55.1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -15,22 +15,22 @@
<dependencies>
<group>
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
</group>
<group targetFramework="MonoAndroid">
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp.Views" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
<dependency id="SkiaSharp.Views" version="1.55.1" />
</group>
<group targetFramework="XamariniOS">
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp.Views" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
<dependency id="SkiaSharp.Views" version="1.55.1" />
</group>
<group targetFramework="uap10.0">
<dependency id="Xamarin.Forms" version="2.3.0" />
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp.Views" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
<dependency id="SkiaSharp.Views" version="1.55.1" />
</group>
</dependencies>
</metadata>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views</id>
<title>SkiaSharp Views &amp; Layers (for macOS)</title>
<version>1.55.0</version>
<version>1.55.1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -13,7 +13,7 @@
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<dependencies>
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
</dependencies>
</metadata>
<files>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views</id>
<title>SkiaSharp Views &amp; Layers (for Windows)</title>
<version>1.55.0</version>
<version>1.55.1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -13,7 +13,7 @@
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<dependencies>
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
</dependencies>
</metadata>
<files>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp.Views</id>
<title>SkiaSharp Views &amp; Layers</title>
<version>1.55.0</version>
<version>1.55.1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@ -13,7 +13,7 @@
<projectUrl>https://github.com/mono/SkiaSharp</projectUrl>
<iconUrl>https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png</iconUrl>
<dependencies>
<dependency id="SkiaSharp" version="1.55.0" />
<dependency id="SkiaSharp" version="1.55.1" />
</dependencies>
</metadata>
<files>

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

@ -3,7 +3,7 @@
<metadata>
<id>SkiaSharp</id>
<title>SkiaSharp (for Windows)</title>
<version>1.55.0</version>
<version>1.55.1</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.55.0</version>
<version>1.55.1</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

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

@ -24,6 +24,7 @@
<JavaMaximumHeapSize />
<JavaOptions />
<NuGetPackageImportStamp></NuGetPackageImportStamp>
<AndroidTlsProvider></AndroidTlsProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -64,19 +65,19 @@
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp">
<HintPath>..\packages\SkiaSharp.1.55.0\lib\MonoAndroid\SkiaSharp.dll</HintPath>
<HintPath>..\packages\SkiaSharp.1.55.1\lib\MonoAndroid\SkiaSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Svg">
<HintPath>..\packages\SkiaSharp.Svg.1.55.0-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Svg.1.55.1-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.Android">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\MonoAndroid\SkiaSharp.Views.Android.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\MonoAndroid\SkiaSharp.Views.Android.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.Forms">
<HintPath>..\packages\SkiaSharp.Views.Forms.1.55.0\lib\MonoAndroid\SkiaSharp.Views.Forms.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.Forms.1.55.1\lib\MonoAndroid\SkiaSharp.Views.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />

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

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="6"
android:versionCode="10551010"
android:installLocation="auto"
android:versionName="1.55.0.0"
android:versionName="1.55.1.0"
package="com.xamarin.skia_forms_demo">
<uses-sdk android:minSdkVersion="15" />
<application android:label="SkiaSharp for Xamarin.Forms"

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

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PCLStorage" version="1.0.2" targetFramework="monoandroid70" />
<package id="SkiaSharp" version="1.55.0" targetFramework="monoandroid60" />
<package id="SkiaSharp.Svg" version="1.55.0-beta1" targetFramework="monoandroid60" />
<package id="SkiaSharp.Views" version="1.55.0" targetFramework="monoandroid60" />
<package id="SkiaSharp.Views.Forms" version="1.55.0" targetFramework="monoandroid60" />
<package id="PCLStorage" version="1.0.2" targetFramework="monoandroid60" />
<package id="SkiaSharp" version="1.55.1" targetFramework="monoandroid60" />
<package id="SkiaSharp.Svg" version="1.55.1-beta1" targetFramework="monoandroid60" />
<package id="SkiaSharp.Views" version="1.55.1" targetFramework="monoandroid60" />
<package id="SkiaSharp.Views.Forms" version="1.55.1" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" />

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

@ -74,15 +74,15 @@
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp">
<HintPath>..\packages\SkiaSharp.1.55.0\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.dll</HintPath>
<HintPath>..\packages\SkiaSharp.1.55.1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Svg">
<HintPath>..\packages\SkiaSharp.Svg.1.55.0-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Svg.1.55.1-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.Forms">
<HintPath>..\packages\SkiaSharp.Views.Forms.1.55.0\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Views.Forms.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.Forms.1.55.1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Views.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Core">

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

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PCLStorage" version="1.0.2" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="SkiaSharp" version="1.55.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="SkiaSharp.Svg" version="1.55.0-beta1" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="SkiaSharp.Views.Forms" version="1.55.0" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="SkiaSharp" version="1.55.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="SkiaSharp.Svg" version="1.55.1-beta1" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="SkiaSharp.Views.Forms" version="1.55.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
<package id="Xamarin.Forms" version="2.3.3.166-pre4" targetFramework="portable45-net45+win8+wp8+wpa81" />
</packages>

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

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

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

@ -4,8 +4,8 @@
<NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
<Import Project="$(NuGetPackageRoot)\SkiaSharp\1.55.0\build\uap10.0\SkiaSharp.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp\1.55.0\build\uap10.0\SkiaSharp.targets')" />
<Import Project="$(NuGetPackageRoot)\SkiaSharp.Views\1.55.0\build\uap10.0\SkiaSharp.Views.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp.Views\1.55.0\build\uap10.0\SkiaSharp.Views.targets')" />
<Import Project="$(NuGetPackageRoot)\SkiaSharp\1.55.1\build\uap10.0\SkiaSharp.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp\1.55.1\build\uap10.0\SkiaSharp.targets')" />
<Import Project="$(NuGetPackageRoot)\SkiaSharp.Views\1.55.1\build\uap10.0\SkiaSharp.Views.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp.Views\1.55.1\build\uap10.0\SkiaSharp.Views.targets')" />
<Import Project="$(NuGetPackageRoot)\Xamarin.Forms\2.3.3.166-pre4\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('$(NuGetPackageRoot)\Xamarin.Forms\2.3.3.166-pre4\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
</ImportGroup>
</Project>

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

@ -2,10 +2,10 @@
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"PCLStorage": "1.0.2",
"SkiaSharp": "1.55.0",
"SkiaSharp.Svg": "1.55.0-beta1",
"SkiaSharp.Views": "1.55.0",
"SkiaSharp.Views.Forms": "1.55.0",
"SkiaSharp": "1.55.1",
"SkiaSharp.Svg": "1.55.1-beta1",
"SkiaSharp.Views": "1.55.1",
"SkiaSharp.Views.Forms": "1.55.1",
"Xamarin.Forms": "2.3.3.166-pre4"
},
"frameworks": {

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

@ -28,13 +28,13 @@
<key>CFBundleIdentifier</key>
<string>com.skiasharp.samples.forms</string>
<key>CFBundleVersion</key>
<string>2.0</string>
<string>10551010</string>
<key>CFBundleIconFiles</key>
<array/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleShortVersionString</key>
<string>1.55.0.0</string>
<string>1.55.1.0</string>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>

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

@ -25,7 +25,7 @@
<MtouchArch>i386, x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>True</MtouchDebug>
<MtouchSdkVersion>10.0</MtouchSdkVersion>
<MtouchSdkVersion></MtouchSdkVersion>
<MtouchProfiling>False</MtouchProfiling>
<MtouchFastDev>False</MtouchFastDev>
<MtouchUseLlvm>False</MtouchUseLlvm>
@ -145,19 +145,19 @@
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp">
<HintPath>..\packages\SkiaSharp.1.55.0\lib\XamariniOS\SkiaSharp.dll</HintPath>
<HintPath>..\packages\SkiaSharp.1.55.1\lib\XamariniOS\SkiaSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Svg">
<HintPath>..\packages\SkiaSharp.Svg.1.55.0-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Svg.1.55.1-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.Forms">
<HintPath>..\packages\SkiaSharp.Views.Forms.1.55.0\lib\XamariniOS\SkiaSharp.Views.Forms.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.Forms.1.55.1\lib\XamariniOS\SkiaSharp.Views.Forms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.iOS">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\XamariniOS\SkiaSharp.Views.iOS.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\XamariniOS\SkiaSharp.Views.iOS.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -183,7 +183,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj">
<Project>{e3d24d5e-80b0-45e1-ad55-d69d00bfa5f8}</Project>
<Project>{E01FBABA-8DA1-432B-9253-F4ABE13A3A6A}</Project>
<Name>Core</Name>
</ProjectReference>
</ItemGroup>

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

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PCLStorage" version="1.0.2" targetFramework="xamarinios10" />
<package id="SkiaSharp" version="1.55.0" targetFramework="xamarinios10" />
<package id="SkiaSharp.Svg" version="1.55.0-beta1" targetFramework="xamarinios10" />
<package id="SkiaSharp.Views" version="1.55.0" targetFramework="xamarinios10" />
<package id="SkiaSharp.Views.Forms" version="1.55.0" targetFramework="xamarinios10" />
<package id="SkiaSharp" version="1.55.1" targetFramework="xamarinios10" />
<package id="SkiaSharp.Svg" version="1.55.1-beta1" targetFramework="xamarinios10" />
<package id="SkiaSharp.Views" version="1.55.1" targetFramework="xamarinios10" />
<package id="SkiaSharp.Views.Forms" version="1.55.1" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.3.3.166-pre4" targetFramework="xamarinios10" />
</packages>

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

@ -7,9 +7,9 @@
<key>CFBundleIdentifier</key>
<string>com.companyname.skiasharpsample-macsample</string>
<key>CFBundleShortVersionString</key>
<string>1.55.0.0</string>
<string>1.55.1.0</string>
<key>CFBundleVersion</key>
<string>2.0</string>
<string>10551010</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>CFBundleDevelopmentRegion</key>

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

@ -50,14 +50,14 @@
<Reference Include="System.Core" />
<Reference Include="Xamarin.Mac" />
<Reference Include="SkiaSharp">
<HintPath>..\packages\SkiaSharp.1.55.0\lib\XamarinMac\SkiaSharp.dll</HintPath>
<HintPath>..\packages\SkiaSharp.1.55.1\lib\XamarinMac\SkiaSharp.dll</HintPath>
</Reference>
<Reference Include="SkiaSharp.Svg">
<HintPath>..\packages\SkiaSharp.Svg.1.55.0-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Svg.1.55.1-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.Mac">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\XamarinMac\SkiaSharp.Views.Mac.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\XamarinMac\SkiaSharp.Views.Mac.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -99,5 +99,5 @@
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" Condition="Exists('..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems')" />
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" Condition="Exists('..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<Import Project="..\packages\SkiaSharp.1.55.0\build\XamarinMac\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.55.0\build\XamarinMac\SkiaSharp.targets')" />
<Import Project="..\packages\SkiaSharp.1.55.1\build\XamarinMac\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.55.1\build\XamarinMac\SkiaSharp.targets')" />
</Project>

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

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SkiaSharp" version="1.55.0" targetFramework="xamarinmac20" />
<package id="SkiaSharp.Svg" version="1.55.0-beta1" targetFramework="xamarinmac20" />
<package id="SkiaSharp.Views" version="1.55.0" targetFramework="xamarinmac20" />
<package id="SkiaSharp" version="1.55.1" targetFramework="xamarinmac20" />
<package id="SkiaSharp.Svg" version="1.55.1-beta1" targetFramework="xamarinmac20" />
<package id="SkiaSharp.Views" version="1.55.1" targetFramework="xamarinmac20" />
</packages>

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

@ -93,14 +93,14 @@
<Reference Include="System.Core" />
<Reference Include="Xamarin.TVOS" />
<Reference Include="SkiaSharp">
<HintPath>..\packages\SkiaSharp.1.55.0\lib\XamarintvOS\SkiaSharp.dll</HintPath>
<HintPath>..\packages\SkiaSharp.1.55.1\lib\XamarintvOS\SkiaSharp.dll</HintPath>
</Reference>
<Reference Include="SkiaSharp.Svg">
<HintPath>..\packages\SkiaSharp.Svg.1.55.0-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Svg.1.55.1-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.tvOS">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\XamarintvOS\SkiaSharp.Views.tvOS.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\XamarintvOS\SkiaSharp.Views.tvOS.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

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

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SkiaSharp" version="1.55.0" targetFramework="xamarintvos10" />
<package id="SkiaSharp.Svg" version="1.55.0-beta1" targetFramework="xamarintvos10" />
<package id="SkiaSharp.Views" version="1.55.0" targetFramework="xamarintvos10" />
<package id="SkiaSharp" version="1.55.1" targetFramework="xamarintvos10" />
<package id="SkiaSharp.Svg" version="1.55.1-beta1" targetFramework="xamarintvos10" />
<package id="SkiaSharp.Views" version="1.55.1" targetFramework="xamarintvos10" />
</packages>

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

@ -4,7 +4,7 @@
<NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
<Import Project="$(NuGetPackageRoot)\SkiaSharp\1.55.0\build\uap10.0\SkiaSharp.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp\1.55.0\build\uap10.0\SkiaSharp.targets')" />
<Import Project="$(NuGetPackageRoot)\SkiaSharp.Views\1.55.0\build\uap10.0\SkiaSharp.Views.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp.Views\1.55.0\build\uap10.0\SkiaSharp.Views.targets')" />
<Import Project="$(NuGetPackageRoot)\SkiaSharp\1.55.1\build\uap10.0\SkiaSharp.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp\1.55.1\build\uap10.0\SkiaSharp.targets')" />
<Import Project="$(NuGetPackageRoot)\SkiaSharp.Views\1.55.1\build\uap10.0\SkiaSharp.Views.targets" Condition="Exists('$(NuGetPackageRoot)\SkiaSharp.Views\1.55.1\build\uap10.0\SkiaSharp.Views.targets')" />
</ImportGroup>
</Project>

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

@ -2,9 +2,9 @@
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
"PCLStorage": "1.0.2",
"SkiaSharp": "1.55.0",
"SkiaSharp.Svg": "1.55.0-beta1",
"SkiaSharp.Views": "1.55.0"
"SkiaSharp": "1.55.1",
"SkiaSharp.Svg": "1.55.1-beta1",
"SkiaSharp.Views": "1.55.1"
},
"frameworks": {
"uap10.0": {}

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

@ -92,19 +92,19 @@
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp">
<HintPath>..\packages\SkiaSharp.1.55.0\lib\net45\SkiaSharp.dll</HintPath>
<HintPath>..\packages\SkiaSharp.1.55.1\lib\net45\SkiaSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Svg">
<HintPath>..\packages\SkiaSharp.Svg.1.55.0-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Svg.1.55.1-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.Desktop">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\net45\SkiaSharp.Views.Desktop.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\net45\SkiaSharp.Views.Desktop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.WPF">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\net45\SkiaSharp.Views.WPF.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\net45\SkiaSharp.Views.WPF.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -180,12 +180,12 @@
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets')" />
<Import Project="..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets'))" />
<Error Condition="!Exists('..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets'))" />
</Target>
<!-- 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.

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

@ -3,7 +3,7 @@
<package id="OpenTK" version="1.1.2349.61993" targetFramework="net45" />
<package id="OpenTK.GLControl" version="1.1.2349.61993" targetFramework="net45" />
<package id="PCLStorage" version="1.0.2" targetFramework="net45" />
<package id="SkiaSharp" version="1.55.0" targetFramework="net45" />
<package id="SkiaSharp.Svg" version="1.55.0-beta1" targetFramework="net45" />
<package id="SkiaSharp.Views" version="1.55.0" targetFramework="net45" />
<package id="SkiaSharp" version="1.55.1" targetFramework="net45" />
<package id="SkiaSharp.Svg" version="1.55.1-beta1" targetFramework="net45" />
<package id="SkiaSharp.Views" version="1.55.1" targetFramework="net45" />
</packages>

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

@ -93,19 +93,19 @@
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp">
<HintPath>..\packages\SkiaSharp.1.55.0\lib\net45\SkiaSharp.dll</HintPath>
<HintPath>..\packages\SkiaSharp.1.55.1\lib\net45\SkiaSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Svg">
<HintPath>..\packages\SkiaSharp.Svg.1.55.0-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Svg.1.55.1-beta1\lib\portable-net45+win8+wpa81+wp8\SkiaSharp.Svg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.Desktop">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\net45\SkiaSharp.Views.Desktop.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\net45\SkiaSharp.Views.Desktop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp.Views.WPF">
<HintPath>..\packages\SkiaSharp.Views.1.55.0\lib\net45\SkiaSharp.Views.WPF.dll</HintPath>
<HintPath>..\packages\SkiaSharp.Views.1.55.1\lib\net45\SkiaSharp.Views.WPF.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -163,12 +163,12 @@
<Import Project="..\..\SkiaSharpSample.Platform.Shared\SkiaSharpSample.Platform.Shared.projitems" Label="Shared" />
<Import Project="..\..\SkiaSharpSample.Shared\SkiaSharpSample.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets')" />
<Import Project="..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.1.55.0\build\net45\SkiaSharp.targets'))" />
<Error Condition="!Exists('..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.1.55.1\build\net45\SkiaSharp.targets'))" />
</Target>
<!-- 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.

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

@ -3,7 +3,7 @@
<package id="OpenTK" version="1.1.2349.61993" targetFramework="net45" />
<package id="OpenTK.GLControl" version="1.1.2349.61993" targetFramework="net45" />
<package id="PCLStorage" version="1.0.2" targetFramework="net45" />
<package id="SkiaSharp" version="1.55.0" targetFramework="net45" />
<package id="SkiaSharp.Svg" version="1.55.0-beta1" targetFramework="net45" />
<package id="SkiaSharp.Views" version="1.55.0" targetFramework="net45" />
<package id="SkiaSharp" version="1.55.1" targetFramework="net45" />
<package id="SkiaSharp.Svg" version="1.55.1-beta1" targetFramework="net45" />
<package id="SkiaSharp.Views" version="1.55.1" targetFramework="net45" />
</packages>

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

@ -10,8 +10,8 @@ using System.Reflection;
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkiaSharp.Svg")]
[assembly: AssemblyVersion("1.55.0.0")]
[assembly: AssemblyFileVersion("1.55.0.0")]
[assembly: AssemblyInformationalVersion("1.55.0.0-{GIT_SHA}")]
[assembly: AssemblyFileVersion("1.55.1.0")]
[assembly: AssemblyInformationalVersion("1.55.1.0-{GIT_SHA}")]
[assembly: AssemblyCopyright("Xamarin Inc.")]
[assembly: AssemblyTrademark("")]

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

@ -27,23 +27,40 @@ namespace SkiaSharp
private readonly Dictionary<string, XElement> defs = new Dictionary<string, XElement>();
public SKSvg()
: this(DefaultPPI)
: this(DefaultPPI, SKSize.Empty)
{
}
public SKSvg(float pixelsPerInch)
: this(pixelsPerInch, SKSize.Empty)
{
}
public SKSvg(SKSize canvasSize)
: this(DefaultPPI, canvasSize)
{
}
public SKSvg(float pixelsPerInch, SKSize canvasSize)
{
CanvasSize = canvasSize;
PixelsPerInch = pixelsPerInch;
ThrowOnUnsupportedElement = DefaultThrowOnUnsupportedElement;
}
public float PixelsPerInch { get; set; }
public bool ThrowOnUnsupportedElement { get; set; }
public SKSize CanvasSize { get; private set; }
public SKPicture Picture { get; private set; }
public string Description { get; private set; }
public string Title { get; private set; }
public string Version { get; private set; }
public SKPicture Load(string filename)
{
return Load(XDocument.Load(filename));
}
public SKPicture Load(Stream stream)
{
return Load(XDocument.Load(stream));
@ -66,32 +83,38 @@ namespace SkiaSharp
Title = svg.Element(ns + "title")?.Value;
Description = svg.Element(ns + "desc")?.Value ?? svg.Element(ns + "description")?.Value;
// get the dimensions
var widthA = svg.Attribute("width");
var heightA = svg.Attribute("height");
var width = ReadNumber(widthA);
var height = ReadNumber(heightA);
var size = new SKSize(width, height);
var viewBox = SKRect.Create(size);
var viewBoxA = svg.Attribute("viewBox") ?? svg.Attribute("viewPort");
if (viewBoxA != null)
if (CanvasSize.IsEmpty)
{
viewBox = ReadRectangle(viewBoxA.Value);
// get the dimensions
var widthA = svg.Attribute("width");
var heightA = svg.Attribute("height");
var width = ReadNumber(widthA);
var height = ReadNumber(heightA);
var size = new SKSize(width, height);
var viewBox = SKRect.Create(size);
var viewBoxA = svg.Attribute("viewBox") ?? svg.Attribute("viewPort");
if (viewBoxA != null)
{
viewBox = ReadRectangle(viewBoxA.Value);
}
if (widthA != null && widthA.Value.Contains("%"))
{
size.Width *= viewBox.Width;
}
if (heightA != null && heightA.Value.Contains("%"))
{
size.Height *= viewBox.Height;
}
// set the property
CanvasSize = size;
}
if (widthA != null && widthA.Value.Contains("%"))
{
size.Width *= viewBox.Width;
}
if (heightA != null && heightA.Value.Contains("%"))
{
size.Height *= viewBox.Height;
}
// craete the picture from the elements
// create the picture from the elements
using (var recorder = new SKPictureRecorder())
using (var canvas = recorder.BeginRecording(SKRect.Create(size)))
using (var canvas = recorder.BeginRecording(SKRect.Create(CanvasSize)))
{
LoadElements(svg.Elements(), canvas);
@ -802,8 +825,6 @@ namespace SkiaSharp
}
}
private readonly Dictionary<string, SKPaint> linearGradients = new Dictionary<string, SKPaint>();
private SKShader ReadGradient(XElement defE)
{
switch (defE.Name.LocalName)

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

@ -10,8 +10,8 @@ using System.Reflection;
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkiaSharp.Views.Forms")]
[assembly: AssemblyVersion("1.55.0.0")]
[assembly: AssemblyFileVersion("1.55.0.0")]
[assembly: AssemblyInformationalVersion("1.55.0.0-{GIT_SHA}")]
[assembly: AssemblyFileVersion("1.55.1.0")]
[assembly: AssemblyInformationalVersion("1.55.1.0-{GIT_SHA}")]
[assembly: AssemblyCopyright("Xamarin Inc.")]
[assembly: AssemblyTrademark("")]

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

@ -7,10 +7,10 @@ using UIColor = AppKit.NSColor;
using UIKit;
#endif
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

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

@ -1,7 +1,7 @@
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

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

@ -1,7 +1,7 @@
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

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

@ -2,10 +2,10 @@ using System;
using CoreAnimation;
using CoreGraphics;
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

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

@ -2,10 +2,10 @@ using System;
using System.Runtime.InteropServices;
using CoreGraphics;
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

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

@ -4,10 +4,10 @@ using CoreGraphics;
using Foundation;
using UIKit;
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#endif
{
[Register(nameof(SKCanvasView))]

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

@ -4,10 +4,10 @@ using CoreGraphics;
using OpenGLES;
using OpenTK.Graphics.ES20;
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#endif
{
public class SKGLLayer : CAEAGLLayer

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

@ -5,10 +5,10 @@ using Foundation;
using GLKit;
using OpenGLES;
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#endif
{
[Register(nameof(SKGLView))]

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

@ -1,9 +1,9 @@
using UIKit;
#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __TVOS__
#if __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#endif
{
public static class iOSExtensions

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

@ -7,12 +7,12 @@ using OpenTK.Graphics.OpenGL;
#if __ANDROID__
namespace SkiaSharp.Views.Android
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __DESKTOP__ || __WPF__
namespace SkiaSharp.Views.Desktop
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

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

@ -1,11 +1,11 @@
#if __ANDROID__
namespace SkiaSharp.Views.Android
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __DESKTOP__ || __WPF__
namespace SkiaSharp.Views.Desktop
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif WINDOWS_UWP
namespace SkiaSharp.Views.UWP
#elif __MACOS__

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

@ -10,8 +10,8 @@ using System.Reflection;
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkiaSharp.Views")]
[assembly: AssemblyVersion("1.55.0.0")]
[assembly: AssemblyFileVersion("1.55.0.0")]
[assembly: AssemblyInformationalVersion("1.55.0.0-{GIT_SHA}")]
[assembly: AssemblyFileVersion("1.55.1.0")]
[assembly: AssemblyInformationalVersion("1.55.1.0-{GIT_SHA}")]
[assembly: AssemblyCopyright("Xamarin Inc.")]
[assembly: AssemblyTrademark("")]

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

@ -2,12 +2,12 @@ using System;
#if __ANDROID__
namespace SkiaSharp.Views.Android
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __DESKTOP__ || __WPF__
namespace SkiaSharp.Views.Desktop
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif WINDOWS_UWP
namespace SkiaSharp.Views.UWP
#elif __MACOS__

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

@ -2,12 +2,12 @@ using System;
#if __ANDROID__
namespace SkiaSharp.Views.Android
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif __IOS__
namespace SkiaSharp.Views.iOS
#elif __DESKTOP__ || __WPF__
namespace SkiaSharp.Views.Desktop
#elif __TVOS__
namespace SkiaSharp.Views.tvOS
#elif WINDOWS_UWP
namespace SkiaSharp.Views.UWP
#elif __MACOS__

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

@ -98,30 +98,33 @@
<Compile Include="..\Tests\SKTest.cs">
<Link>SKTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKTypefaceTest.cs" >
<Compile Include="..\Tests\SKTypefaceTest.cs">
<Link>SKTypefaceTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKPaintTest.cs" >
<Compile Include="..\Tests\SKPaintTest.cs">
<Link>SKPaintTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKPathTest.cs" >
<Compile Include="..\Tests\SKPathTest.cs">
<Link>SKPathTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKColorTest.cs" >
<Compile Include="..\Tests\SKColorTest.cs">
<Link>SKColorTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKBasicTypesTest.cs" >
<Compile Include="..\Tests\SKBasicTypesTest.cs">
<Link>SKBasicTypesTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKBitmapTest.cs" >
<Compile Include="..\Tests\SKBitmapTest.cs">
<Link>SKBitmapTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKDataTest.cs" >
<Compile Include="..\Tests\SKDataTest.cs">
<Link>SKDataTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKColorTableTest.cs" >
<Compile Include="..\Tests\SKColorTableTest.cs">
<Link>SKColorTableTest.cs</Link>
</Compile>
<Compile Include="..\Tests\SKSvgTest.cs">
<Link>SKSvgTest.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\samples\SkiaSharpSample.Shared\Media\content-font.ttf">
@ -168,6 +171,10 @@
<Link>images\color-wheel.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\..\samples\SkiaSharpSample.Shared\Media\logos.svg">
<Link>images\logos.svg</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
@ -178,6 +185,10 @@
<Project>{eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df}</Project>
<Name>SkiaSharp.Desktop</Name>
</ProjectReference>
<ProjectReference Include="..\..\source\SkiaSharp.Svg\SkiaSharp.Svg\SkiaSharp.Svg.csproj">
<Project>{04C4399A-6740-4733-B6B7-F968232A76C8}</Project>
<Name>SkiaSharp.Svg</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\..\binding\SkiaSharp.Desktop\bin\$(Configuration)\SkiaSharp.Desktop.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

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

@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Desktop", "..\..\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Desktop.Tests", "SkiaSharp.Desktop.Tests.csproj", "{F0179CDB-9435-4FB4-8E52-DBF191079491}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Portable", "..\..\binding\SkiaSharp.Portable\SkiaSharp.Portable.csproj", "{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkiaSharp.Svg", "..\..\source\SkiaSharp.Svg\SkiaSharp.Svg\SkiaSharp.Svg.csproj", "{04C4399A-6740-4733-B6B7-F968232A76C8}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\..\binding\Binding\Binding.projitems*{9c502b9a-25d4-473f-89bd-5a13dde16354}*SharedItemsImports = 13
@ -47,6 +51,30 @@ Global
{F0179CDB-9435-4FB4-8E52-DBF191079491}.Release|x64.Build.0 = Release|x64
{F0179CDB-9435-4FB4-8E52-DBF191079491}.Release|x86.ActiveCfg = Release|x86
{F0179CDB-9435-4FB4-8E52-DBF191079491}.Release|x86.Build.0 = Release|x86
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Debug|x64.ActiveCfg = Debug|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Debug|x64.Build.0 = Debug|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Debug|x86.ActiveCfg = Debug|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Debug|x86.Build.0 = Debug|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Release|Any CPU.Build.0 = Release|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Release|x64.ActiveCfg = Release|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Release|x64.Build.0 = Release|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Release|x86.ActiveCfg = Release|Any CPU
{7AA90628-2FDD-4585-AF2F-CC51CFA8B52A}.Release|x86.Build.0 = Release|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Debug|x64.ActiveCfg = Debug|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Debug|x64.Build.0 = Debug|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Debug|x86.ActiveCfg = Debug|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Debug|x86.Build.0 = Debug|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Release|Any CPU.Build.0 = Release|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Release|x64.ActiveCfg = Release|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Release|x64.Build.0 = Release|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Release|x86.ActiveCfg = Release|Any CPU
{04C4399A-6740-4733-B6B7-F968232A76C8}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

49
tests/Tests/SKSvgTest.cs Normal file
Просмотреть файл

@ -0,0 +1,49 @@
using System;
using System.IO;
using NUnit.Framework;
namespace SkiaSharp.Tests
{
[TestFixture]
public class SKSvgTest : SKTest
{
[Test]
public void LoadSvgCanvasSize()
{
var path = Path.Combine (PathToImages, "logos.svg");
var svg = new SKSvg();
svg.Load(path);
Assert.AreEqual(new SKSize(300, 300), svg.CanvasSize);
}
[Test]
public void LoadSvgCustomCanvasSize()
{
var path = Path.Combine (PathToImages, "logos.svg");
var svg = new SKSvg(new SKSize(150, 150));
svg.Load(path);
Assert.AreEqual(new SKSize(150, 150), svg.CanvasSize);
}
[Test]
public void SvgLoadsToBitmap()
{
var path = Path.Combine (PathToImages, "logos.svg");
var background = (SKColor)0xfff8f8f8;
var svg = new SKSvg();
svg.Load(path);
var bmp = new SKBitmap((int)svg.CanvasSize.Width, (int)svg.CanvasSize.Height);
var canvas = new SKCanvas(bmp);
canvas.DrawPicture(svg.Picture);
canvas.Flush();
Assert.AreEqual(background, bmp.GetPixel(0,0));
}
}
}