protected void PaintOnBackBuffer(int width, int height)
 {
     if (vectorGraphics)
     {
         return;
     }
     if (!area.IsEmpty)
     {
         backBuffer.FillRectangle(Color.LightGray, 0, 0, width, height);
         backBuffer.FillRectangle(Color.White, area.X, area.Y, area.Width, area.Height);
     }
     else
     {
         backBuffer.FillRectangle(BackColor, 0, 0, width, height);
     }
     PaintGrid(width, height);
     SymbolProperties[] gg = ArrayUtils.GetKeys(values);
     int[] counts          = new int[gg.Length];
     for (int i = 0; i < counts.Length; i++)
     {
         counts[i] = values[gg[i]].Count;
     }
     int[] o = ArrayUtils.Order(counts);
     Array.Reverse(o);
     gg = ArrayUtils.SubArray(gg, o);
     foreach (SymbolProperties g in gg)
     {
         bool[,] vals    = values[g].Data;
         double[,] zvals = null;
         if (zValues != null)
         {
             zvals = zValues[g];
         }
         for (int i = 0; i < width; i++)
         {
             for (int j = 0; j < height; j++)
             {
                 if (vals[i, j] && backBuffer != null)
                 {
                     Color color;
                     if (zvals != null && !double.IsNaN(zvals[i, j]) && colorScale != null)
                     {
                         color = colorScale.GetColor(zvals[i, j]);
                     }
                     else
                     {
                         color = g.Color;
                     }
                     SymbolType symbolType = SymbolType.allSymbols[g.Type];
                     int        symbolSize = g.Size;
                     if (symbolSize > 0)
                     {
                         int[] pathX;
                         int[] pathY;
                         symbolType.GetPath(symbolSize, out pathX, out pathY);
                         backBuffer.DrawPath(color, i, j, pathX, pathY);
                     }
                 }
             }
         }
     }
 }