本文整理汇总了C#中Envelope.TopRight方法的典型用法代码示例。如果您正苦于以下问题:C# Envelope.TopRight方法的具体用法?C# Envelope.TopRight怎么用?C# Envelope.TopRight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Envelope
的用法示例。
在下文中一共展示了Envelope.TopRight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SplitBoundingBox
private static void SplitBoundingBox(Envelope input, out Envelope out1, out Envelope out2)
{
double range;
/* -------------------------------------------------------------------- */
/* Split in X direction. */
/* -------------------------------------------------------------------- */
if (input.Width > input.Height)
{
range = input.Width*SplitRatio;
out1 = new Envelope(input.BottomLeft(), new Coordinate(input.MinX + range, input.MaxY));
out2 = new Envelope(new Coordinate(input.MaxX - range, input.MinY), input.TopRight());
}
/* -------------------------------------------------------------------- */
/* Otherwise split in Y direction. */
/* -------------------------------------------------------------------- */
else
{
range = input.Height*SplitRatio;
out1 = new Envelope(input.BottomLeft(), new Coordinate(input.MaxX, input.MinY + range));
out2 = new Envelope(new Coordinate(input.MinX, input.MaxY - range), input.TopRight());
}
//Debug.Assert(out1.Intersects(out2));
}
示例2: GroundToImage
public Envelope GroundToImage(Envelope e)
{
var res = new Envelope(GroundToImage(e.TopLeft()));
res.ExpandToInclude(GroundToImage(e.TopRight()));
res.ExpandToInclude(GroundToImage(e.BottomLeft()));
res.ExpandToInclude(GroundToImage(e.BottomRight()));
return res;
}