本文整理汇总了C#中System.Drawing.Rectangle.ToRectangleF方法的典型用法代码示例。如果您正苦于以下问题:C# Rectangle.ToRectangleF方法的具体用法?C# Rectangle.ToRectangleF怎么用?C# Rectangle.ToRectangleF使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Rectangle
的用法示例。
在下文中一共展示了Rectangle.ToRectangleF方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetClip
public void SetClip(Rectangle rect, CombineMode combineMode)
{
SetClip (rect.ToRectangleF (), combineMode);
}
示例2: DrawPie
public void DrawPie(Pen pen, Rectangle rect, float startAngle, float sweepAngle)
{
DrawPie(pen, rect.ToRectangleF(), startAngle, sweepAngle);
}
示例3: DrawImage
public override void DrawImage(object backend, object img, Rectangle srcRect, Rectangle destRect, double alpha)
{
CGContext ctx = ((CGContextBackend)backend).Context;
NSImage image = (NSImage) img;
var rect = new RectangleF (0, 0, (float)destRect.Width, (float)destRect.Height);
ctx.SaveState ();
ctx.SetAlpha ((float)alpha);
ctx.TranslateCTM ((float)destRect.X, (float)destRect.Y + rect.Height);
ctx.ScaleCTM (1f, -1f);
ctx.DrawImage (rect, image.AsCGImage (RectangleF.Empty, null, null).WithImageInRect (srcRect.ToRectangleF ()));
ctx.RestoreState ();
}
示例4: DrawImage
public void DrawImage(Image image, Rectangle rect)
{
DrawImage(image, rect.ToRectangleF());
}
示例5: DrawEllipse
public void DrawEllipse(Pen pen, Rectangle rect)
{
DrawEllipse(pen, rect.ToRectangleF());
}
示例6: DrawImage
public void DrawImage(object backend, object img, Rectangle srcRect, Rectangle destRect, double alpha)
{
CGContext ctx = ((CGContextBackend)backend).Context;
NSImage image = (NSImage) img;
ctx.SaveState ();
ctx.SetAlpha ((float)alpha);
ctx.DrawImage (destRect.ToRectangleF (), image.AsCGImage (RectangleF.Empty, null, null).WithImageInRect (srcRect.ToRectangleF ()));
ctx.RestoreState ();
}
示例7: DrawImage
public override void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)
{
if (srcUnit != GraphicsUnit.Pixel)
throw new NotImplementedException();
Bitmap bitmap = _imageAttributesCache.GetOrCreateBitmapFromImageAndAttributes(image, imageAttr);
DrawTexture(bitmap, texture =>
{
RectangleF dstRect = destRect.ToRectangleF();
RectangleF srcRect = new RectangleF(0, 0, texture.OriginalWidth, texture.OriginalHeight);
texture.Draw(dstRect, srcRect);
});
}
示例8: FillRectangle
public override void FillRectangle(Brush brush, Rectangle rect)
{
FillRectangle(brush, rect.ToRectangleF());
}