本文整理匯總了C#中System.Drawing.DrawImage方法的典型用法代碼示例。如果您正苦於以下問題:C# Drawing.DrawImage方法的具體用法?C# Drawing.DrawImage怎麽用?C# Drawing.DrawImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Drawing
的用法示例。
在下文中一共展示了Drawing.DrawImage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CleanUp
public void CleanUp(D2D1.RenderTarget target, GDI.Graphics g, Map map)
{
target.EndDraw();
using (var sc = TakeScreenshotGdi(map.Size))
g.DrawImage(sc, new GDI.Point(0, 0));
target.Dispose();
//Monitor.Exit(_syncRoot);
}
示例2: RenderScreen
public void RenderScreen(Sd.Graphics g)
{
g.DrawImage(_screen.NativeBitmap, new Sd.PointF(0, 0));
}
示例3: RenderTo
static void RenderTo(this ImageDrawing drawing, d.Graphics graphics, double opacity) {
var image = drawing.ImageSource.ToGdiPlus();
if (image != null) {
var ia = new di.ImageAttributes();
ia.SetColorMatrix(new di.ColorMatrix { Matrix33 = (float)opacity });
var r = drawing.Rect;
graphics.DrawImage(image,
new[]{r.TopLeft.ToGdiPlus(), r.TopRight.ToGdiPlus(), r.BottomLeft.ToGdiPlus()},
new d.RectangleF(0, 0, image.Width, image.Height), d.GraphicsUnit.Pixel, ia);
}
}