Show / Hide Table of Contents

Class FloatPixelTexture

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<float>
FloatPixelTexture
Implements
ITexture
Inherited Members
PixelTexture<float>.Sampler
PixelTexture<float>.Size
PixelTexture<float>.this[Point]
PixelTexture<float>.this[Rectangle]
PixelTexture<float>.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 FloatPixelTexture : PixelTexture<float>, ITexture

Constructors

| Edit this page View Source

FloatPixelTexture(int, int, float[], ISampler<float>, ColorFormat)

Initializes a new instance of the FloatPixelTexture class.

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

The width of the texture.

int height

The height of the texture.

float[] data

The pixel-data of the texture.

ISampler<float> 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

FloatPixelTexture(int, int, float[], ColorFormat)

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

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

The width of the texture.

int height

The height of the texture.

float[] 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<float> Data { get; }
Property Value
Type Description
ReadOnlySpan<float>
Overrides
PixelTexture<float>.Data

Methods

| Edit this page View Source

GetColor(in ReadOnlySpan<float>)

Converts the pixel-data to a color.

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

The pixel-data to convert.

Returns
Type Description
Color

The color represented by the specified pixel-data.

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

Implements

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