Class SKTexture
Represents a SkiaSharp-based RGB.NET PixelTexture
public sealed class SKTexture : PixelTexture<byte>, ITexture, IDisposable
- Inheritance
-
PixelTexture<byte>SKTexture
- Implements
-
ITexture
- Inherited Members
-
PixelTexture<byte>.SamplerPixelTexture<byte>.SizePixelTexture<byte>.this[Point]
Properties
Data
Gets the color data in RGB format
protected override ReadOnlySpan<byte> Data { get; }
Property Value
ImageInfo
Gets the image info used to create the Surface
public SKImageInfo ImageInfo { get; }
Property Value
IsInvalid
Gets a boolean indicating whether Invalidate() has been called on this texture, indicating it should be replaced
public bool IsInvalid { get; }
Property Value
this[Rectangle]
Gets the sampled color inside the specified rectangle.
public override Color this[in Rectangle rectangle] { get; }
Parameters
rectangle
RectangleThe rectangle to get the color from.
Property Value
- Color
The sampled color.
RenderScale
Gets the render scale of the texture
public float RenderScale { get; }
Property Value
Surface
Gets the SKBitmap backing this texture
public SKSurface Surface { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~SKTexture()
protected ~SKTexture()
GetColor(in ReadOnlySpan<byte>)
Converts the pixel-data to a color.
protected override Color GetColor(in ReadOnlySpan<byte> pixel)
Parameters
pixel
ReadOnlySpan<byte>The pixel-data to convert.
Returns
- Color
The color represented by the specified pixel-data.
Invalidate()
Invalidates the texture
public void Invalidate()