Clouds texture:具有云彩的纹理效果,示例如下:
CloudsTexture textureGenerator = new CloudsTexture();
float[,] texture = textureGenerator.Generate(320, 240);
pictureBox1.Image = TextureTools.ToBitmap(texture);
运行结果:
LabyrinthTexture:生成具有迷宫效果的纹理。
// create texture generator
LabyrinthTexture textureGenerator = new LabyrinthTexture();
// generate new texture
float[,] texture = textureGenerator.Generate(320, 240);
// convert it to image to visualize
Bitmap textureImage = TextureTools.ToBitmap(texture);
pictureBox1.Image = TextureTools.ToBitmap(texture);
运行结果:
MarbleTexture:生成具有大理石效果的纹理。
// 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);
pictureBox1.Image = TextureTools.ToBitmap(texture);
运行结果:
TextileTexture:生成具有织物形状的纹理。
// create texture generator
TextileTexture textureGenerator = new TextileTexture();
// generate new texture
float[,] texture = textureGenerator.Generate(320, 240);
pictureBox1.Image = TextureTools.ToBitmap(texture);
运行程序:
WoodTexture :生成具有木质形状的纹理。
// create texture generator
WoodTexture textureGenerator = new WoodTexture();
// generate new texture
float[,] texture = textureGenerator.Generate(320, 240);
pictureBox1.Image = TextureTools.ToBitmap(texture);
运行结果: