Exemplo n.º 1
0
 private void button4_Click(object sender, System.EventArgs e)
 {
     if (!QuiltedTextureMapValid)
     {
         MessageBox.Show("Please load a valid quilt file first.");
         return;
     }
     if (QuiltedTextureMap.Width <= (int)numericUpDownWangTileSize.Value)
     {
         MessageBox.Show("Your Wang Tiles must be smaller than your quilted image texture.");
         return;
     }
     WangTile[] wangTiles = WangTile.LoadDescriptionsFromFile(new StreamReader(new MemoryStream(System.Text.Encoding.ASCII.GetBytes(this.textBoxWangSpecs.Text))));
     WangTiles = WangTiler.WangTile(wangTiles, new Size((int)numericUpDownWangTileSize.Value, (int)numericUpDownWangTileSize.Value),
                                    new Bitmap[] { QuiltedTextureMap }, (int)numericUpDownQuiltingBlockOverlap.Value,
                                    (int)numericUpDownMaxWangMatchAttempts.Value, (int)numericUpDownMaxWangMatchError.Value,
                                    checkBoxOnePixelOverlapBetweenTiles.Checked);
     Console.WriteLine("yeah");
 }