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.
Implements
Inherited Members
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public sealed class PixelTexture : PixelTexture<Color>, ITexture
Constructors
| Edit this page View SourcePixelTexture(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. |
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 SourceData
Gets the underlying pixel data.
Declaration
protected override ReadOnlySpan<Color> Data { get; }
Property Value
Type | Description |
---|---|
ReadOnlySpan<Color> |
Overrides
Methods
| Edit this page View SourceGetColor(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. |