背景色を塗りつぶすサンプル
1 2 3 4 5 6 7 8 9 10 11 12 |
public Bitmap bmp = new Bitmap(128, 128); using (var gfx = Graphics.FromImage(bmp)) { gfx.FillRectangle( new SolidBrush(Color.FromArgb(208, 25, 25, 112)),//navy new Rectangle(0, 0, bmp.Width, bmp.Height)); gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; gfx.SmoothingMode = SmoothingMode.HighQuality; } bmp.Dispose(); |