Show / Hide Table of Contents

Class BytePixelTexture

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

Inheritance
object
PixelTexture<byte>
BytePixelTexture
Implements
ITexture
Inherited Members
PixelTexture<byte>.Sampler
PixelTexture<byte>.Size
PixelTexture<byte>.this[Point]
PixelTexture<byte>.this[Rectangle]
PixelTexture<byte>.this[int, int, int, int]
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Presets.Textures
Assembly: RGB.NET.Presets.dll
Syntax
public sealed class BytePixelTexture : PixelTexture<byte>, ITexture

Constructors

| Edit this page View Source

BytePixelTexture(int, int, byte[], ISampler<byte>, ColorFormat)

Initializes a new instance of the BytePixelTexture class.

Declaration
public BytePixelTexture(int with, int height, byte[] data, ISampler<byte> sampler, ColorFormat colorFormat = ColorFormat.RGB)
Parameters
Type Name Description
int with

The width of the texture.

int height

The height of the texture.

byte[] data

The pixel-data of the texture.

ISampler<byte> sampler

The sampler used to get the color of a region.

ColorFormat colorFormat

The color format the data is in. (default: RGB)

| Edit this page View Source

BytePixelTexture(int, int, byte[], ColorFormat)

Initializes a new instance of the BytePixelTexture class. A AverageColorSampler is used.

Declaration
public BytePixelTexture(int with, int height, byte[] data, ColorFormat colorFormat = ColorFormat.RGB)
Parameters
Type Name Description
int with

The width of the texture.

int height

The height of the texture.

byte[] data

The pixel-data of the texture.

ColorFormat colorFormat

The color format the data is in. (default: RGB)

Properties

| Edit this page View Source

ColorFormat

Gets the color format the data is in.

Declaration
public ColorFormat ColorFormat { get; }
Property Value
Type Description
ColorFormat
| Edit this page View Source

Data

Gets the underlying pixel data.

Declaration
protected override ReadOnlySpan<byte> Data { get; }
Property Value
Type Description
ReadOnlySpan<byte>
Overrides
PixelTexture<byte>.Data

Methods

| Edit this page View Source

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
PixelTexture<byte>.GetColor(in ReadOnlySpan<byte>)

Implements

ITexture
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX