示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="graphics"></param>
 /// <param name="overlay"></param>
 public static void MergeOverlay(Graphics graphics, BlockDefinition overlay)
 {
     using (Bitmap temp = GraphicUtils.LoadImage(overlay.src, PixelFormat.Format32bppArgb))
     {
         graphics.DrawImage(temp, overlay.location.x, overlay.location.y, temp.Width, temp.Height);
     }
 }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="graphics"></param>
 /// <param name="overlay"></param>
 public static void MergeOverlay(Graphics graphics, BlockDefinition overlay)
 {
     using (Image temp = GraphicUtils.LoadImage(overlay.src))
     {
         Bitmap b = ((Bitmap)temp).Clone(new Rectangle(0, 0, temp.Width, temp.Height), PixelFormat.Format32bppArgb);
         //b.MakeTransparent();
         graphics.DrawImage(b, overlay.location.x, overlay.location.y, b.Width, b.Height);
         b.Dispose();
     }
 }