示例#1
0
 private unsafe static int DrawImageImpl(IntPtr thisPtr, IntPtr image, IntPtr targetOffset, IntPtr imageRectangle, SharpDX.Direct2D1.InterpolationMode interpolationMode, SharpDX.Direct2D1.CompositeMode compositeMode)
 {
     try
     {
         var shadow   = ToShadow <CommandSinkShadow>(thisPtr);
         var callback = (CommandSink)shadow.Callback;
         callback.DrawImage(new Image(image),
                            targetOffset == IntPtr.Zero ? (RawVector2?)null : *(RawVector2 *)targetOffset,
                            imageRectangle == IntPtr.Zero ? (RawRectangleF?)null : *(RawRectangleF *)imageRectangle,
                            interpolationMode,
                            compositeMode);
     }
     catch (Exception exception)
     {
         return((int)SharpDX.Result.GetResultFromException(exception));
     }
     return(Result.Ok.Code);
 }
示例#2
0
 /// <summary>
 /// No documentation.
 /// </summary>
 /// <param name="image">No documentation.</param>
 /// <param name="interpolationMode">No documentation.</param>
 /// <param name="compositeMode">No documentation.</param>
 /// <unmanaged>void ID2D1DeviceContext::DrawImage([In] ID2D1Image* image,[In, Optional] const D2D_POINT_2F* targetOffset,[In, Optional] const D2D_RECT_F* imageRectangle,[In] D2D1_INTERPOLATION_MODE interpolationMode,[In] D2D1_COMPOSITE_MODE compositeMode)</unmanaged>
 public void DrawImage(SharpDX.Direct2D1.Image image, SharpDX.Direct2D1.InterpolationMode interpolationMode = InterpolationMode.Linear, SharpDX.Direct2D1.CompositeMode compositeMode = CompositeMode.SourceOver)
 {
     DrawImage(image, null, null, interpolationMode, compositeMode);
 }
示例#3
0
 /// <summary>
 /// No documentation.
 /// </summary>
 /// <param name="effect">No documentation.</param>
 /// <param name="interpolationMode">No documentation.</param>
 /// <param name="compositeMode">No documentation.</param>
 /// <unmanaged>void ID2D1DeviceContext::DrawImage([In] ID2D1Image* image,[In, Optional] const D2D_POINT_2F* targetOffset,[In, Optional] const D2D_RECT_F* imageRectangle,[In] D2D1_INTERPOLATION_MODE interpolationMode,[In] D2D1_COMPOSITE_MODE compositeMode)</unmanaged>
 public void DrawImage(SharpDX.Direct2D1.Effect effect, SharpDX.Direct2D1.InterpolationMode interpolationMode = InterpolationMode.Linear, SharpDX.Direct2D1.CompositeMode compositeMode = CompositeMode.SourceOver)
 {
     using (var output = effect.Output)
         DrawImage(output, null, null, interpolationMode, compositeMode);
 }
示例#4
0
 /// <unmanaged>HRESULT ID2D1CommandSink::DrawImage([In] ID2D1Image* image,[In, Optional] const D2D_POINT_2F* targetOffset,[In, Optional] const D2D_RECT_F* imageRectangle,[In] D2D1_INTERPOLATION_MODE interpolationMode,[In] D2D1_COMPOSITE_MODE compositeMode)</unmanaged>
 public void DrawImage(SharpDX.Direct2D1.Image image, SharpDX.Vector2?targetOffset, SharpDX.RectangleF?imageRectangle, SharpDX.Direct2D1.InterpolationMode interpolationMode, SharpDX.Direct2D1.CompositeMode compositeMode)
 {
     DrawImage_(image, targetOffset, imageRectangle, interpolationMode, compositeMode);
 }