changelogs/SkiaSharp/1.56.2/SkiaSharp.md
Added methods:
public void ResetContext (GRBackendState state);
public void ResetContext (GRGlBackendState state);
public void ResetContext (uint state);
Removed method:
public SKColor GetIndex8Color (int x, int y);
Added methods:
public static SKBitmap Decode (System.IO.Stream stream);
public static SKBitmap Decode (System.IO.Stream stream, SKImageInfo bitmapInfo);
public static SKImageInfo DecodeBounds (System.IO.Stream stream);
public static SKBitmap FromImage (SKImage image);
public SKPMColor GetIndex8Color (int x, int y);
Added methods:
public void DrawVertices (SKVertexMode vmode, SKPoint[] vertices, SKColor[] colors, SKPaint paint);
public void DrawVertices (SKVertexMode vmode, SKPoint[] vertices, SKPoint[] texs, SKColor[] colors, SKPaint paint);
public void DrawVertices (SKVertexMode vmode, SKPoint[] vertices, SKPoint[] texs, SKColor[] colors, ushort[] indices, SKPaint paint);
public void DrawVertices (SKVertexMode vmode, SKPoint[] vertices, SKPoint[] texs, SKColor[] colors, SKBlendMode mode, ushort[] indices, SKPaint paint);
Added constructors:
public SKColorTable (SKPMColor[] colors);
public SKColorTable (SKPMColor[] colors, int count);
Modified properties:
-public SKColor[] Colors { get; }
+public SKPMColor[] Colors { get; }
-public SKColor this [int index] { get; }
+public SKPMColor this [int index] { get; }
Added property:
public SKColor[] UnPreMultipledColors { get; }
Added method:
public SKColor GetUnPreMultipliedColor (int index);
Obsoleted constructors:
[Obsolete ("Use SKData.Empty instead.")]
public SKData ();
[Obsolete ("Use SKData.CreateCopy(byte[]) instead.")]
public SKData (byte[] bytes);
[Obsolete ("Use SKData.CreateCopy(byte[], ulong) instead.")]
public SKData (byte[] bytes, ulong length);
[Obsolete ("Use SKData.CreateCopy(IntPtr, ulong) instead.")]
public SKData (IntPtr bytes, ulong length);
Added property:
public static SKData Empty { get; }
Obsoleted methods:
[Obsolete ()]
public static SKData FromMallocMemory (IntPtr bytes, ulong length);
Added methods:
public static SKData Create (IntPtr address, int length);
public static SKData Create (IntPtr address, int length, SKDataReleaseDelegate releaseProc);
public static SKData Create (IntPtr address, int length, SKDataReleaseDelegate releaseProc, object context);
public static SKData CreateCopy (byte[] bytes);
public static SKData CreateCopy (byte[] bytes, ulong length);
public static SKData CreateCopy (IntPtr bytes, ulong length);
Added properties:
public SKAlphaType AlphaType { get; }
public bool IsAlphaOnly { get; }
public bool IsTextureBacked { get; }
Obsoleted methods:
[Obsolete ("Use FromEncodedData instead.")]
public static SKImage FromData (SKData data);
[Obsolete ("Use FromEncodedData instead.")]
public static SKImage FromData (SKData data, SKRectI subset);
Added methods:
public SKImage ApplyImageFilter (SKImageFilter filter, SKRectI subset, SKRectI clipBounds, out SKRectI outSubset, out SKPoint outOffset);
public static SKImage Create (SKImageInfo info);
public static SKImage FromAdoptedTexture (GRContext context, GRBackendTextureDesc desc);
public static SKImage FromAdoptedTexture (GRContext context, GRBackendTextureDesc desc, SKAlphaType alpha);
public static SKImage FromEncodedData (SKData data);
public static SKImage FromEncodedData (SKData data, SKRectI subset);
public static SKImage FromPicture (SKPicture picture, SKSizeI dimensions);
public static SKImage FromPicture (SKPicture picture, SKSizeI dimensions, SKMatrix matrix);
public static SKImage FromPicture (SKPicture picture, SKSizeI dimensions, SKPaint paint);
public static SKImage FromPicture (SKPicture picture, SKSizeI dimensions, SKMatrix matrix, SKPaint paint);
public static SKImage FromPixelCopy (SKPixmap pixmap);
public static SKImage FromPixelCopy (SKImageInfo info, IntPtr pixels);
public static SKImage FromPixelCopy (SKImageInfo info, IntPtr pixels, int rowBytes);
public static SKImage FromPixelCopy (SKImageInfo info, IntPtr pixels, int rowBytes, SKColorTable ctable);
public static SKImage FromPixelData (SKImageInfo info, SKData data, int rowBytes);
public static SKImage FromPixels (SKPixmap pixmap);
public static SKImage FromPixels (SKImageInfo info, IntPtr pixels);
public static SKImage FromPixels (SKPixmap pixmap, SKImageRasterReleaseDelegate releaseProc);
public static SKImage FromPixels (SKPixmap pixmap, SKImageRasterReleaseDelegate releaseProc, object releaseContext);
public static SKImage FromTexture (GRContext context, GRBackendTextureDesc desc);
public static SKImage FromTexture (GRContext context, GRBackendTextureDesc desc, SKAlphaType alpha);
public static SKImage FromTexture (GRContext context, GRBackendTextureDesc desc, SKAlphaType alpha, SKImageTextureReleaseDelegate releaseProc);
public static SKImage FromTexture (GRContext context, GRBackendTextureDesc desc, SKAlphaType alpha, SKImageTextureReleaseDelegate releaseProc, object releaseContext);
public SKPixmap PeekPixels ();
public bool PeekPixels (SKPixmap pixmap);
public bool ReadPixels (SKPixmap pixmap, int srcX, int srcY);
public bool ReadPixels (SKPixmap pixmap, int srcX, int srcY, SKImageCachingHint cachingHint);
public bool ReadPixels (SKImageInfo dstInfo, IntPtr dstPixels, int dstRowBytes, int srcX, int srcY);
public bool ReadPixels (SKImageInfo dstInfo, IntPtr dstPixels, int dstRowBytes, int srcX, int srcY, SKImageCachingHint cachingHint);
public bool ScalePixels (SKPixmap dst, SKFilterQuality quality);
public bool ScalePixels (SKPixmap dst, SKFilterQuality quality, SKImageCachingHint cachingHint);
public SKImage Subset (SKRectI subset);
public SKImage ToRasterImage ();
public SKShader ToShader (SKShaderTileMode tileX, SKShaderTileMode tileY);
public SKShader ToShader (SKShaderTileMode tileX, SKShaderTileMode tileY, SKMatrix localMatrix);
public SKImage ToTextureImage (GRContext context);
Modified fields:
-public readonly SKImageInfo Empty;
+public SKImageInfo Empty;
-public readonly SKColorType PlatformColorType;
+public SKColorType PlatformColorType;
Added fields:
public static int PlatformColorAlphaShift;
public static int PlatformColorBlueShift;
public static int PlatformColorGreenShift;
public static int PlatformColorRedShift;
Added properties:
public int BitsPerPixel { get; }
public long BytesSize64 { get; }
public long RowBytes64 { get; }
Obsoleted methods:
[Obsolete ("Use AddPath(SKPath, SKPathAddMode) instead.")]
public void AddPath (SKPath other, SKPath.AddMode mode);
[Obsolete ("Use AddPath(SKPath, ref SKMatrix, SKPathAddMode) instead.")]
public void AddPath (SKPath other, ref SKMatrix matrix, SKPath.AddMode mode);
[Obsolete ("Use AddPath(SKPath, float, float, SKPathAddMode) instead.")]
public void AddPath (SKPath other, float dx, float dy, SKPath.AddMode mode);
Modified methods:
public void AddPath (SKPath other, SKPath.AddMode mode--- = 0---)
public void AddPath (SKPath other, ref SKMatrix matrix, SKPath.AddMode mode--- = 0---)
public void AddPath (SKPath other, float dx, float dy, SKPath.AddMode mode--- = 0---)
Added methods:
public void AddPath (SKPath other, SKPathAddMode mode);
public void AddPath (SKPath other, ref SKMatrix matrix, SKPathAddMode mode);
public void AddPath (SKPath other, float dx, float dy, SKPathAddMode mode);
Removed method:
public SKPath.Verb Next (SKPoint[] points, bool doConsumeDegenerates, bool exact);
Added method:
public SKPathVerb Next (SKPoint[] points, bool doConsumeDegenerates, bool exact);
Removed methods:
public SKPath.Verb Next (SKPoint[] points);
public SKPath.Verb Peek ();
Added methods:
public SKPathVerb Next (SKPoint[] points);
public SKPathVerb Peek ();
Obsoleted methods:
[Obsolete ("Use GetMatrix(float, out SKMatrix, SKPathMeasureMatrixFlags) instead.")]
public bool GetMatrix (float distance, out SKMatrix matrix, SKPathMeasure.MatrixFlags flags);
Added method:
public bool GetMatrix (float distance, out SKMatrix matrix, SKPathMeasureMatrixFlags flags);
Added constructor:
public SKPixmap (SKImageInfo info, IntPtr addr);
Added method:
public static SKTypeface FromStream (System.IO.Stream stream, int index);
[Serializable]
[Flags]
public enum GRBackendState {
All = 4294967295,
}
[Serializable]
[Flags]
public enum GRGlBackendState {
All = 65535,
Blend = 8,
FixedFunction = 512,
MSAAEnable = 16,
Misc = 1024,
PathRendering = 2048,
PixelStore = 128,
Program = 256,
RenderTarget = 1,
Stencil = 64,
TextureBinding = 2,
Vertex = 32,
View = 4,
}
public sealed delegate SKDataReleaseDelegate : System.MulticastDelegate, System.ICloneable, System.Runtime.Serialization.ISerializable {
// constructors
public SKDataReleaseDelegate (object object, IntPtr method);
// methods
public virtual System.IAsyncResult BeginInvoke (IntPtr address, object context, System.AsyncCallback callback, object object);
public virtual void EndInvoke (System.IAsyncResult result);
public virtual void Invoke (IntPtr address, object context);
}
public class SKFrontBufferedStream : System.IO.Stream, System.IAsyncDisposable, System.IDisposable {
// constructors
public SKFrontBufferedStream (System.IO.Stream stream);
public SKFrontBufferedStream (System.IO.Stream stream, bool disposeUnderlyingStream);
public SKFrontBufferedStream (System.IO.Stream stream, long bufferSize);
public SKFrontBufferedStream (System.IO.Stream stream, long bufferSize, bool disposeUnderlyingStream);
// fields
public static const int DefaultBufferSize;
// properties
public override bool CanRead { get; }
public override bool CanSeek { get; }
public override bool CanWrite { get; }
public override long Length { get; }
public override long Position { get; set; }
// methods
protected override void Dispose (bool disposing);
public override void Flush ();
public override int Read (byte[] buffer, int offset, int count);
public override long Seek (long offset, System.IO.SeekOrigin origin);
public override void SetLength (long value);
public override void Write (byte[] buffer, int offset, int count);
}
[Serializable]
public enum SKImageCachingHint {
Allow = 0,
Disallow = 1,
}
public sealed delegate SKImageRasterReleaseDelegate : System.MulticastDelegate, System.ICloneable, System.Runtime.Serialization.ISerializable {
// constructors
public SKImageRasterReleaseDelegate (object object, IntPtr method);
// methods
public virtual System.IAsyncResult BeginInvoke (IntPtr pixels, object context, System.AsyncCallback callback, object object);
public virtual void EndInvoke (System.IAsyncResult result);
public virtual void Invoke (IntPtr pixels, object context);
}
public sealed delegate SKImageTextureReleaseDelegate : System.MulticastDelegate, System.ICloneable, System.Runtime.Serialization.ISerializable {
// constructors
public SKImageTextureReleaseDelegate (object object, IntPtr method);
// methods
public virtual System.IAsyncResult BeginInvoke (object context, System.AsyncCallback callback, object object);
public virtual void EndInvoke (System.IAsyncResult result);
public virtual void Invoke (object context);
}
public class SKMatrix44 : SkiaSharp.SKObject, System.IDisposable {
// constructors
public SKMatrix44 ();
public SKMatrix44 (SKMatrix src);
public SKMatrix44 (SKMatrix44 src);
public SKMatrix44 (SKMatrix44 a, SKMatrix44 b);
// properties
public float Item { get; set; }
public SKMatrix Matrix { get; }
public SKMatrix44TypeMask Type { get; }
// methods
public static SKMatrix44 CreateIdentity ();
public static SKMatrix44 CreateRotation (float x, float y, float z, float radians);
public static SKMatrix44 CreateRotationDegrees (float x, float y, float z, float degrees);
public static SKMatrix44 CreateScale (float x, float y, float z);
public static SKMatrix44 CreateTranslate (float x, float y, float z);
public double Determinant ();
protected override void Dispose (bool disposing);
public static bool Equal (SKMatrix44 left, SKMatrix44 right);
public static SKMatrix44 FromColumnMajor (float[] src);
public static SKMatrix44 FromRowMajor (float[] src);
public SKMatrix44 Invert ();
public bool Invert (SKMatrix44 inverse);
public SKPoint MapPoint (SKPoint src);
public SKPoint[] MapPoints (SKPoint[] src);
public float[] MapScalars (float[] srcVector4);
public void MapScalars (float[] srcVector4, float[] dstVector4);
public float[] MapScalars (float x, float y, float z, float w);
public float[] MapVector2 (float[] src2);
public void MapVector2 (float[] src2, float[] dst4);
public void PostConcat (SKMatrix44 m);
public void PostScale (float sx, float sy, float sz);
public void PostTranslate (float dx, float dy, float dz);
public void PreConcat (SKMatrix44 m);
public void PreScale (float sx, float sy, float sz);
public void PreTranslate (float dx, float dy, float dz);
public bool Preserves2DAxisAlignment (float epsilon);
public void SetColumnMajor (float[] src);
public void SetConcat (SKMatrix44 a, SKMatrix44 b);
public void SetIdentity ();
public void SetRotationAbout (float x, float y, float z, float radians);
public void SetRotationAboutDegrees (float x, float y, float z, float degrees);
public void SetRotationAboutUnit (float x, float y, float z, float radians);
public void SetRowMajor (float[] src);
public void SetScale (float sx, float sy, float sz);
public void SetTranslate (float dx, float dy, float dz);
public float[] ToColumnMajor ();
public void ToColumnMajor (float[] dst);
public float[] ToRowMajor ();
public void ToRowMajor (float[] dst);
public void Transpose ();
}
[Serializable]
[Flags]
public enum SKMatrix44TypeMask {
Affine = 4,
Identity = 0,
Perspective = 8,
Scale = 2,
Translate = 1,
}
public struct SKPMColor {
// constructors
public SKPMColor (uint value);
// properties
public byte Alpha { get; }
public byte Blue { get; }
public byte Green { get; }
public byte Red { get; }
// methods
public override bool Equals (object other);
public override int GetHashCode ();
public static SKPMColor PreMultiply (SKColor color);
public static SKPMColor[] PreMultiply (SKColor[] colors);
public override string ToString ();
public static SKColor UnPreMultiply (SKPMColor pmcolor);
public static SKColor[] UnPreMultiply (SKPMColor[] pmcolors);
public static bool op_Equality (SKPMColor left, SKPMColor right);
public static SKPMColor op_Explicit (SKColor color);
public static SKColor op_Explicit (SKPMColor color);
public static uint op_Explicit (SKPMColor color);
public static SKPMColor op_Implicit (uint color);
public static bool op_Inequality (SKPMColor left, SKPMColor right);
}
[Serializable]
public enum SKPathAddMode {
Append = 0,
Extend = 1,
}
[Serializable]
[Flags]
public enum SKPathMeasureMatrixFlags {
GetPosition = 1,
GetPositionAndTangent = 3,
GetTangent = 2,
}
[Serializable]
public enum SKPathVerb {
Close = 5,
Conic = 3,
Cubic = 4,
Done = 6,
Line = 1,
Move = 0,
Quad = 2,
}
[Serializable]
public enum SKVertexMode {
TriangleFan = 2,
TriangleStrip = 1,
Triangles = 0,
}