Class SKTexture
Represents a SkiaSharp-based RGB.NET PixelTexture
Inherited Members
PixelTexture<byte>.Sampler
PixelTexture<byte>.Size
PixelTexture<byte>.this[Point]
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public sealed class SKTexture : PixelTexture<byte>, ITexture, IDisposable
Properties
Data
Gets the color data in RGB format
Declaration
protected override ReadOnlySpan<byte> Data { get; }
Property Value
Type | Description |
---|---|
ReadOnlySpan<byte> |
Overrides
RGB.NET.Core.PixelTexture<byte>.Data
ImageInfo
Gets the image info used to create the Surface
Declaration
public SKImageInfo ImageInfo { get; }
Property Value
Type | Description |
---|---|
SKImageInfo |
IsInvalid
Gets a boolean indicating whether Invalidate() has been called on this texture, indicating it should be replaced
Declaration
public bool IsInvalid { get; }
Property Value
Type | Description |
---|---|
bool |
this[Rectangle]
Gets the sampled color inside the specified rectangle.
Declaration
public override Color this[in Rectangle rectangle] { get; }
Parameters
Type | Name | Description |
---|---|---|
Rectangle | rectangle | The rectangle to get the color from. |
Property Value
Type | Description |
---|---|
Color | The sampled color. |
Overrides
RGB.NET.Core.PixelTexture<byte>.this[RGB.NET.Core.Rectangle]
RenderScale
Gets the render scale of the texture
Declaration
public float RenderScale { get; }
Property Value
Type | Description |
---|---|
float |
Surface
Gets the SKBitmap backing this texture
Declaration
public SKSurface Surface { get; }
Property Value
Type | Description |
---|---|
SKSurface |
Methods
Dispose()
Declaration
public void Dispose()
~SKTexture()
Declaration
protected ~SKTexture()
GetColor(in ReadOnlySpan<byte>)
Converts the pixel-data to a color.
Declaration
protected override Color GetColor(in ReadOnlySpan<byte> pixel)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | pixel | The pixel-data to convert. |
Returns
Type | Description |
---|---|
Color | The color represented by the specified pixel-data. |
Overrides
Invalidate()
Invalidates the texture
Declaration
public void Invalidate()
Implements
RGB.NET.Core.ITexture