public void DrawImage( ID2D1Image image, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver) { DrawImage(image, null, null, interpolationMode, compositeMode); }
/// <summary> /// Sets the input by using the output of a given effect. /// </summary> /// <param name="index">Index of the input</param> /// <param name="effect">Effect output to use as input</param> /// <param name="invalidate">To invalidate</param> public void SetInputEffect(int index, ID2D1Effect effect, bool invalidate = true) { using (ID2D1Image output = effect.Output) { SetInput(index, output, invalidate); } }
public static void DrawImage(this ID2D1DeviceContext context, ID2D1Image image, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE.D2D1_INTERPOLATION_MODE_LINEAR, D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE.D2D1_COMPOSITE_MODE_SOURCE_OVER, D2D_POINT_2F?targetOffset = null, D2D_RECT_F?imageRectangle = null) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (image == null) { throw new ArgumentNullException(nameof(image)); } using (var irc = imageRectangle.StructureToMemory()) { using (var to = targetOffset.StructureToMemory()) { context.DrawImage(image, to.Pointer, irc.Pointer, interpolationMode, compositeMode); } } }
public void DrawImage( ID2D1Image image, Vector2 targetOffset, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver) { DrawImage(image, targetOffset, null, interpolationMode, compositeMode); }
public static void SetTarget(this ID2D1RenderTarget context, ID2D1Image target) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (target == null) { throw new ArgumentNullException(nameof(context)); } context.SetTarget(target); }
public static void SetInput(this ID2D1Effect effect, ID2D1Image image, int index = 0, bool invalidate = false) { if (effect == null) { throw new ArgumentNullException(nameof(effect)); } if (image == null) { throw new ArgumentNullException(nameof(image)); } effect.SetInput((uint)index, image, invalidate); }
public Result WriteFrame(ID2D1Image image, IWICBitmapFrameEncode frameEncode, WICImageParameters imageParameters) { return(WriteFrame(image, frameEncode, ref imageParameters)); }
public Result WriteThumbnail(ID2D1Image image, IWICBitmapEncoder encoder, WICImageParameters imageParameters) { return(WriteThumbnail(image, encoder, ref imageParameters)); }