|
|
[C#]using (Bitmap pie = new
Bitmap(500, 500)) {
using (Graphics gr = Graphics.FromImage(pie)) {
RectangleF rect = pie.Bounds;
rect.Inflate(-50, -50);
gr.FillPie(Brushes.Red, rect, 20, 100);
pie.Backdrop = Color.SeaGreen;
}
pie.Save(Server.MapPath("IG8_Image_Backdrop.png"));
}
The code here draws a red pie slice on a bitmap. It then sets
the backdrop color of the Bitmap to green and saves. the final
output as a PNG. The final output is shown below.
IG8_Image_Backdrop.png
|