SampleApp.MainForm.ShowTexture C# (CSharp) Method

ShowTexture() private method

private ShowTexture ( ) : void
return void
        private void ShowTexture( )
        {
            // check generator
            if ( textureGenerator == null )
            {
                pictureBox.Image = null;
                return;
            }

            int width = pictureBox.ClientRectangle.Width;
            int height = pictureBox.ClientRectangle.Height;

            // generate texture
            float[,] texture = textureGenerator.Generate( width, height );

            // create bitmap from the texture
            Bitmap image = TextureTools.ToBitmap( texture );

            // show image
            pictureBox.Image = image;
        }
MainForm