当前位置: 首页>>代码示例>>C#>>正文


C# Rectangle.MakeXYAndWidthHeight方法代码示例

本文整理汇总了C#中Rectangle.MakeXYAndWidthHeight方法的典型用法代码示例。如果您正苦于以下问题:C# Rectangle.MakeXYAndWidthHeight方法的具体用法?C# Rectangle.MakeXYAndWidthHeight怎么用?C# Rectangle.MakeXYAndWidthHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Rectangle的用法示例。


在下文中一共展示了Rectangle.MakeXYAndWidthHeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

 /// <summary>	
 /// <p>Initializes the bitmap clipper with the provided parameters.</p>	
 /// </summary>	
 /// <param name="sourceRef"><dd>  <p>he input bitmap source.</p> </dd></param>	
 /// <param name="rectangleRef"><dd>  <p>The rectangle of the bitmap source to clip.</p> </dd></param>	
 /// <returns><p>If this method succeeds, it returns <strong><see cref="SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref="SharpDX.Result"/></strong> error code.</p></returns>	
 /// <msdn-id>ee719677</msdn-id>	
 /// <unmanaged>HRESULT IWICBitmapClipper::Initialize([In, Optional] IWICBitmapSource* pISource,[In] const WICRect* prc)</unmanaged>	
 /// <unmanaged-short>IWICBitmapClipper::Initialize</unmanaged-short>	
 public unsafe void Initialize(SharpDX.WIC.BitmapSource sourceRef, Rectangle rectangleRef)
 {
     rectangleRef.MakeXYAndWidthHeight();
     Initialize(sourceRef, new IntPtr(&rectangleRef));
 }
开发者ID:numo16,项目名称:SharpDX,代码行数:14,代码来源:BitmapClipper.cs

示例2: CopyPixels

 /// <summary>
 /// Copies pixel data using the supplied input parameters.
 /// </summary>
 /// <param name="rectangle">The rectangle.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="guidDstFormat">The GUID DST format.</param>
 /// <param name="dstTransform">The DST transform.</param>
 /// <param name="stride">The stride.</param>
 /// <param name="output">The output.</param>
 /// <returns></returns>
 /// <unmanaged>HRESULT IWICBitmapSourceTransform::CopyPixels([In, Optional] const WICRect* prc,[In] unsigned int uiWidth,[In] unsigned int uiHeight,[In, Optional] GUID* pguidDstFormat,[In] WICBitmapTransformOptions dstTransform,[In] unsigned int nStride,[In] unsigned int cbBufferSize,[In] void* pbBuffer)</unmanaged>
 public unsafe void CopyPixels(Rectangle rectangle, int width, int height, System.Guid guidDstFormat, SharpDX.WIC.BitmapTransformOptions dstTransform, int stride, DataStream output)
 {
     rectangle.MakeXYAndWidthHeight();
     CopyPixels(new IntPtr(&rectangle), width, height, guidDstFormat, dstTransform, stride, (int)(output.Length - output.Position),
                output.PositionPointer);
 }
开发者ID:QuantumDeveloper,项目名称:SharpDX,代码行数:18,代码来源:BitmapSourceTransform.cs


注:本文中的Rectangle.MakeXYAndWidthHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。