C# Класс Accord.Imaging.Textures.WoodTexture

Wood texture.

The texture generator creates textures with effect of rings on trunk's shear. The Rings property allows to specify the desired amount of wood rings.

The generator is based on the Perlin noise function.

Sample usage:

// create texture generator WoodTexture textureGenerator = new WoodTexture( ); // generate new texture float[,] texture = textureGenerator.Generate( 320, 240 ); // convert it to image to visualize Bitmap textureImage = TextureTools.ToBitmap( texture );

Result image:

Наследование: ITextureGenerator
Показать файл Открыть проект

Открытые методы

Метод Описание
Generate ( int width, int height ) : ].float[

Generate texture.

Generates new texture of the specified size.

Reset ( ) : void

Reset generator.

Regenerates internal random numbers.

WoodTexture ( ) : Accord.Math

Initializes a new instance of the WoodTexture class.

WoodTexture ( double rings ) : Accord.Math

Initializes a new instance of the WoodTexture class.

Описание методов

Generate() публичный Метод

Generate texture.
Generates new texture of the specified size.
public Generate ( int width, int height ) : ].float[
width int Texture's width.
height int Texture's height.
Результат ].float[

Reset() публичный Метод

Reset generator.
Regenerates internal random numbers.
public Reset ( ) : void
Результат void

WoodTexture() публичный Метод

Initializes a new instance of the WoodTexture class.
public WoodTexture ( ) : Accord.Math
Результат Accord.Math

WoodTexture() публичный Метод

Initializes a new instance of the WoodTexture class.
public WoodTexture ( double rings ) : Accord.Math
rings double Wood rings amount.
Результат Accord.Math