/// <summary>
 /// Get a raster layer.
 /// </summary>
 /// <param name="layer"></param>
 /// <returns></returns>
 public Raster GetRaster(PictureLayer layer)
 {
     switch (layer) {
         case PictureLayer.Visual: return Visual;
         case PictureLayer.Priority: return Priority;
         case PictureLayer.Control: return Control;
         case PictureLayer.Auxiliary: return Auxiliary;
         default: throw new ArgumentException(typeof(PictureLayer).Name + " value " + layer + " is not valid.", "layer");
     }
 }
 /// <summary>
 /// Clear all of the layers to their default values (by default), or specific layers with specific values if desired. This locks, then unlocks the bitmaps.
 /// </summary>
 /// <param name="visualValue">What to clear the visual map to if Layer.Visual is included in mask.</param>
 /// <param name="priorityValue">What to clear the priority map to if Layer.Priority is included in mask.</param>
 /// <param name="controlValue">What to clear the control map to if Layer.Control is included in mask.</param>
 /// <param name="auxiliaryValue">What to clear the auxiliary map to if Layer.Auxiliary is included in mask.</param>
 /// <param name="mask"></param>
 public virtual void Clear(byte visualValue = 15, byte priorityValue = 0, byte controlValue = 0, byte auxiliaryValue = 0, PictureLayer mask = PictureLayer.All)
 {
     Lock();
     if ((mask & PictureLayer.Visual) != 0)
         Visual.Clear(visualValue);
     if ((mask & PictureLayer.Priority) != 0)
         Priority.Clear(priorityValue);
     if ((mask & PictureLayer.Control) != 0)
         Control.Clear(controlValue);
     if ((mask & PictureLayer.Auxiliary) != 0)
         Auxiliary.Clear(auxiliaryValue);
     Unlock();
 }