本文整理汇总了C#中RectangleD.ToRectangleF方法的典型用法代码示例。如果您正苦于以下问题:C# RectangleD.ToRectangleF方法的具体用法?C# RectangleD.ToRectangleF怎么用?C# RectangleD.ToRectangleF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RectangleD
的用法示例。
在下文中一共展示了RectangleD.ToRectangleF方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
internal Present Render(MapRectangle mapRect, Size size, bool useDocumentTransparency, bool exactColors)
{
Monitor.Enter(this);
Present result;
try
{
RectangleD rectangleD = new RectangleD(mapRect.lon0 * (double)this.boundingBox.Width - 0.5, -mapRect.lat1 * (double)this.boundingBox.Height + (double)this.actualBoundingBox.Height - 0.5, (mapRect.lon1 - mapRect.lon0) * (double)this.boundingBox.Width + (double)this.hackRectangleAdjust, (mapRect.lat1 - mapRect.lat0) * (double)this.boundingBox.Height + (double)this.hackRectangleAdjust);
RectangleD rectangleD2 = new RectangleD(0.0, 0.0, (double)size.Width, (double)size.Height);
this.Reclip(this.actualBoundingBox, ref rectangleD, ref rectangleD2);
D.Say(10, string.Format("Rendering {0} from {1}", mapRect, rectangleD));
GDIBigLockedImage gDIBigLockedImage = new GDIBigLockedImage(size, "GDIVerb");
if (exactColors)
{
gDIBigLockedImage.SetInterpolationMode(InterpolationMode.NearestNeighbor);
}
else
{
gDIBigLockedImage.SetInterpolationMode(InterpolationMode.HighQualityBicubic);
}
gDIBigLockedImage.DrawImageOntoThis(this.loadedImage, rectangleD2.ToRectangleF(), rectangleD.ToRectangleF());
result = new ImageRef(new ImageRefCounted(gDIBigLockedImage));
}
finally
{
Monitor.Exit(this);
}
return result;
}