Table of Contents

Class SKTexture

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

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>.Sampler
PixelTexture<byte>.Size
PixelTexture<byte>.this[Point]

Properties

Data

Gets the color data in RGB format

protected override ReadOnlySpan<byte> Data { get; }

Property Value

ReadOnlySpan<byte>

ImageInfo

Gets the image info used to create the Surface

public SKImageInfo ImageInfo { get; }

Property Value

SKImageInfo

IsInvalid

Gets a boolean indicating whether Invalidate() has been called on this texture, indicating it should be replaced

public bool IsInvalid { get; }

Property Value

bool

this[Rectangle]

Gets the sampled color inside the specified rectangle.

public override Color this[in Rectangle rectangle] { get; }

Parameters

rectangle Rectangle

The 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

float

Surface

Gets the SKBitmap backing this texture

public SKSurface Surface { get; }

Property Value

SKSurface

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()