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

Marble texture.

The texture generator creates textures with effect of marble. The XPeriod and YPeriod properties allow to control the look of marble texture in X/Y directions.

The generator is based on the Perlin noise function.

Sample usage:

// create texture generator MarbleTexture textureGenerator = new MarbleTexture( ); // 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.

MarbleTexture ( ) : Accord.Math

Initializes a new instance of the MarbleTexture class.

MarbleTexture ( double xPeriod, double yPeriod ) : Accord.Math

Initializes a new instance of the MarbleTexture class.

Reset ( ) : void

Reset generator.

Regenerates internal random numbers.

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

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[

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

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

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

Initializes a new instance of the MarbleTexture class.
public MarbleTexture ( double xPeriod, double yPeriod ) : Accord.Math
xPeriod double X period value.
yPeriod double Y period value.
Результат Accord.Math

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

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