ImageGlass.ImageBox.CreateGridTileImage C# (CSharp) Method

CreateGridTileImage() protected method

Creates the grid tile image.
protected CreateGridTileImage ( int cellSize, Color firstColor, Color secondColor ) : Bitmap
cellSize int Size of the cell.
firstColor Color The first color.
secondColor Color Color of the second.
return System.Drawing.Bitmap
        protected virtual Bitmap CreateGridTileImage(int cellSize, Color firstColor, Color secondColor)
        {
            float scale;

            // rescale the cell size
            switch (GridScale)
            {
                case ImageBoxGridScale.Medium:
                    scale = 1.5F;
                    break;

                case ImageBoxGridScale.Large:
                    scale = 2;
                    break;

                case ImageBoxGridScale.Tiny:
                    scale = 0.5F;
                    break;

                default:
                    scale = 1;
                    break;
            }

            cellSize = (int)(cellSize * scale);

            return CreateCheckerBoxTile(cellSize, firstColor, secondColor);
        }
ImageBox