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


C# System.Drawing.RectangleF.ToSharpDX方法代码示例

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


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

示例1: FillRectangle

 /// <summary>
 /// Paints the interior of the specified rectangle</summary>
 /// <param name="rect">Rectangle to paint, in pixels</param>
 /// <param name="brush">The brush used to paint the rectangle's interior</param>
 public void FillRectangle(RectangleF rect, D2dBrush brush)
 {
     m_renderTarget.FillRectangle(rect.ToSharpDX(), brush.NativeBrush);
 }
开发者ID:sbambach,项目名称:ATF,代码行数:8,代码来源:D2dGraphics.cs

示例2: FillOpacityMask

 /// <summary>
 /// Draws a solid rectangle with the specified brush while using the alpha channel of the given
 /// bitmap to control the opacity of each pixel.</summary>
 /// <param name="opacityMask">The opacity mask to apply to the brush. The alpha value of
 /// each pixel in the region specified by sourceRectangle is multiplied with the alpha value
 /// of the brush after the brush has been mapped to the area defined by destinationRectangle.</param>
 /// <param name="brush">The brush used to paint the region of the render target specified by destinationRectangle.</param>
 /// <param name="destRect">The region of the render target to paint, in device-independent pixels.</param>
 /// <param name="sourceRect">The region of the bitmap to use as the opacity mask, in device-independent pixels.</param>
 public void FillOpacityMask(D2dBitmap opacityMask, D2dBrush brush, RectangleF destRect, RectangleF sourceRect)
 {
     m_renderTarget.FillOpacityMask(opacityMask.NativeBitmap, brush.NativeBrush,
                                    OpacityMaskContent.Graphics,
                                    destRect.ToSharpDX(), sourceRect.ToSharpDX());
 }
开发者ID:sbambach,项目名称:ATF,代码行数:15,代码来源:D2dGraphics.cs

示例3: DrawRectangle

 /// <summary>
 /// Draws the outline of a rectangle that has the specified dimensions and stroke style</summary>
 /// <param name="rect">The dimensions of the rectangle to draw, in pixels</param>
 /// <param name="brush">The brush used to paint the rectangle's stroke</param>
 /// <param name="strokeWidth">A value greater than or equal to 0.0f that specifies the width 
 /// of the rectangle's stroke. The stroke is centered on the rectangle's outline.</param>
 /// <param name="strokeStyle">The style of stroke to paint or null to draw a solid line</param>
 public void DrawRectangle(RectangleF rect, D2dBrush brush, float strokeWidth = 1.0f, D2dStrokeStyle strokeStyle = null)
 {
     m_renderTarget.DrawRectangle(rect.ToSharpDX(), brush.NativeBrush, strokeWidth,
         strokeStyle != null ? strokeStyle.NativeStrokeStyle : null);
 }
开发者ID:sbambach,项目名称:ATF,代码行数:12,代码来源:D2dGraphics.cs

示例4: DrawBitmap

 /// <summary>
 /// Draws the specified bitmap after scaling it to the size of the specified rectangle</summary>
 /// <param name="bmp">The bitmap to render</param>
 /// <param name="destRect">The size and position, in pixels, in the D2dGraphics's coordinate
 /// space, of the area in which the bitmap is drawn. If the rectangle is not well-ordered,
 /// nothing is drawn, but the D2dGraphics does not enter an error state.</param>
 /// <param name="opacity">A value between 0.0f and 1.0f, inclusive, that specifies an opacity value        
 /// to apply to the bitmap. This value is multiplied against the alpha values
 /// of the bitmap's contents.</param>
 /// <param name="interpolationMode">The interpolation mode to use if the bitmap is scaled or rotated 
 /// by the drawing operation</param>
 /// <param name="sourceRect">The size and position, in pixels in the bitmap's coordinate space, of the area
 /// within the bitmap to draw</param>
 public void DrawBitmap(D2dBitmap bmp, RectangleF destRect, float opacity,
     D2dBitmapInterpolationMode interpolationMode, RectangleF sourceRect)
 {
     m_renderTarget.DrawBitmap(bmp.NativeBitmap, destRect.ToSharpDX(), opacity,
         (BitmapInterpolationMode)interpolationMode, sourceRect.ToSharpDX());
 }
开发者ID:sbambach,项目名称:ATF,代码行数:19,代码来源:D2dGraphics.cs

示例5: PushAxisAlignedClip

 /// <summary>    
 /// Specifies a rectangle to which all subsequent drawing operations are clipped</summary>
 /// <remarks>The clipRect is transformed by the current world transform set on the render target.
 /// After the transform is applied to the clipRect that is passed in, the axis-aligned 
 /// bounding box for the clipRect is computed. For efficiency, the contents are clipped 
 /// to this axis-aligned bounding box and not to the original clipRect that is passed in.</remarks>    
 /// <param name="clipRect">The size and position of the clipping area, in pixels</param>
 /// <param name="antialiasMode">The antialiasing mode that is used to draw the edges of clip rects that have subpixel 
 /// boundaries, and to blend the clip with the scene contents. The blending is performed 
 /// once when the PopAxisAlignedClip method is called, and does not apply to each 
 /// primitive within the layer.</param>        
 public void PushAxisAlignedClip(RectangleF clipRect, D2dAntialiasMode antialiasMode)
 {
     m_clipStack.Push(clipRect);
     m_renderTarget.PushAxisAlignedClip(clipRect.ToSharpDX(), (AntialiasMode)antialiasMode);
 }
开发者ID:sbambach,项目名称:ATF,代码行数:16,代码来源:D2dGraphics.cs


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