Neco/LandView/GraphicsEngine.cs
/// <summary>Generates a blank canvas the size of the given country</summary>
/// <param name="L"></param>
/// <returns></returns>
Generates a blank canvas the size of the given country
Generates a blank canvas the size of the given country
public static Image GenerateCanvas(LandViewItem L) {
            if (L.Width() == 0 || L.Height() == 0) { return new Bitmap(1, 1); }
            Image I = new Bitmap(L.Width()+MARGIN*2, L.Height()+MARGIN*2); 
            Graphics GRM = Graphics.FromImage(I);
            GRM.FillRectangle(new SolidBrush(Color.White), 0, 0, I.Width, I.Height);
            GRM.Dispose();
            return I;
        }
public static Image GenerateCanvas ( LandViewItem L ) { if ( L . Width ( ) == 0 || L . Height ( ) == 0 ) { return new Bitmap ( 1 , 1 ) ; } Image I = new Bitmap ( L . Width ( ) + MARGIN * 2 , L . Height ( ) + MARGIN * 2 ) ; Graphics GRM = Graphics . FromImage ( I ) ; GRM . FillRectangle ( new SolidBrush ( Color . White ) , 0 , 0 , I . Width , I . Height ) ; GRM . Dispose ( ) ; return I ; }
Generates a blank canvas the size of the given country
Generates a blank canvas the size of the given country
//We add some padding.
None
L
LandViewItem
None