Ejemplo n.º 1
0
        private Bitmap GenerateHeatmap(GameEngine game, Bitmap bmpNewPreview)
        {
            //if ((DateTime.Now - heatmapTimestamp).Seconds < 0.05)
            //    return bmpNewPreview; // Only update image every 50 milliseconds

            Bitmap tempHeatmapMask = new Bitmap(bmpNewPreview);

            // Call CreateIntensityMask, give it the memory bitmap, and store the result back in the memory bitmap
            bmpHeatmap = Heatmap.CreateIntensityMask(tempHeatmapMask);

            // Colorize the memory bitmap and assign it as the picture boxes image
            bmpHeatmap = Heatmap.Colorize(bmpHeatmap, 255);
            heatmapTimestamp = DateTime.Now;

            // Add together
            Add filterAdd = new Add(bmpHeatmap);
            filterAdd.ApplyInPlace(bmpNewPreview);

            return bmpNewPreview;
        }
Ejemplo n.º 2
0
 public void SelectObject(int index)
 {
     overlay.SelectObject(index);
     for (int i = 0; i < filters.Count; i++)
     {
         if (filters[i] is Add)
         {
             filters[i] = new Add(overlay.image.display);
             return;
         }
     }
 }