/// <summary> /// Draws a bitmap image. /// </summary> /// <param name="source">The bitmap image.</param> /// <param name="opacity">The opacity to draw with.</param> /// <param name="sourceRect">The rect in the image to draw.</param> /// <param name="destRect">The rect in the output to draw to.</param> public void DrawImage(IBitmap source, double opacity, Rect sourceRect, Rect destRect) { BitmapImpl impl = (BitmapImpl)source.PlatformImpl; Bitmap d2d = impl.GetDirect2DBitmap(_renderTarget); _renderTarget.DrawBitmap( d2d, destRect.ToSharpDX(), (float)opacity, BitmapInterpolationMode.Linear, sourceRect.ToSharpDX()); }
/// <summary> /// Draws a bitmap image. /// </summary> /// <param name="source">The bitmap image.</param> /// <param name="opacity">The opacity to draw with.</param> /// <param name="sourceRect">The rect in the image to draw.</param> /// <param name="destRect">The rect in the output to draw to.</param> public void DrawImage(IBitmap source, double opacity, Rect sourceRect, Rect destRect) { BitmapImpl impl = (BitmapImpl)source.PlatformImpl; Bitmap d2d = impl.GetDirect2DBitmap(_renderTarget); _renderTarget.DrawBitmap( d2d, destRect.ToSharpDX(), (float)opacity, BitmapInterpolationMode.Linear, sourceRect.ToSharpDX()); }