src/AircraftTrajectories/Models/Visualisation/LegendCreator.cs
/// <summary>
/// Fills in the outlying space of the legend and title transparent
/// </summary>
/// <param name="bmp"></param>
/// <param name="gradient"></param>
Fills in the outlying space of the legend and title transparent
Fills in the outlying space of the legend and title transparent
public void TransparentBackground(Bitmap bmp, Boolean gradient)
        {
            using (Graphics graphics2 = Graphics.FromImage(bmp))
            using (Brush brush2 = new SolidBrush(Color.FromArgb(0, 0, 0, 0)))
            {
                Graphics g = Graphics.FromImage(bmp);
                if (gradient)
                {
                    g.FillRectangle(brush2, 75, 0, 58, 320);
                } else
                {
                    g.FillRectangle(brush2, 0, 0, 200, 30);
                }
            }
        }
public void TransparentBackground ( Bitmap bmp , Boolean gradient ) { using ( Graphics graphics2 = Graphics . FromImage ( bmp ) ) using ( Brush brush2 = new SolidBrush ( Color . FromArgb ( 0 , 0 , 0 , 0 ) ) ) { Graphics g = Graphics . FromImage ( bmp ) ; if ( gradient ) { g . FillRectangle ( brush2 , 75 , 0 , 58 , 320 ) ; } else { g . FillRectangle ( brush2 , 0 , 0 , 200 , 30 ) ; } } }
Fills in the outlying space of the legend and title transparent
Fills in the outlying space of the legend and title transparent
// generate transparent background
bmp
Bitmap
None
gradient
Boolean
None