Show / Hide Table of Contents

Class PixelTexture

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<Color>
PixelTexture
Implements
ITexture
Inherited Members
PixelTexture<Color>.Sampler
PixelTexture<Color>.Size
PixelTexture<Color>.this[Point]
PixelTexture<Color>.this[Rectangle]
PixelTexture<Color>.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.Core
Assembly: RGB.NET.Core.dll
Syntax
public sealed class PixelTexture : PixelTexture<Color>, ITexture

Constructors

| Edit this page View Source

PixelTexture(int, int, Color[])

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

Declaration
public PixelTexture(int with, int height, Color[] data)
Parameters
Type Name Description
int with

The width of the texture.

int height

The height of the texture.

Color[] data

The pixel-data of the texture.

| Edit this page View Source

PixelTexture(int, int, Color[], ISampler<Color>)

Initializes a new instance of the PixelTexture class.

Declaration
public PixelTexture(int with, int height, Color[] data, ISampler<Color> sampler)
Parameters
Type Name Description
int with

The width of the texture.

int height

The height of the texture.

Color[] data

The pixel-data of the texture.

ISampler<Color> sampler

The sampler used to get the color of a region.

Properties

| Edit this page View Source

Data

Gets the underlying pixel data.

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

Methods

| Edit this page View Source

GetColor(in ReadOnlySpan<Color>)

Converts the pixel-data to a color.

Declaration
protected override Color GetColor(in ReadOnlySpan<Color> pixel)
Parameters
Type Name Description
ReadOnlySpan<Color> pixel

The pixel-data to convert.

Returns
Type Description
Color

The color represented by the specified pixel-data.

Overrides
PixelTexture<Color>.GetColor(in ReadOnlySpan<Color>)

Implements

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