本文整理汇总了C#中IVwGraphics.GetClipRect方法的典型用法代码示例。如果您正苦于以下问题:C# IVwGraphics.GetClipRect方法的具体用法?C# IVwGraphics.GetClipRect怎么用?C# IVwGraphics.GetClipRect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVwGraphics
的用法示例。
在下文中一共展示了IVwGraphics.GetClipRect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsAfterVisibleBoxes
/// <summary>
/// Answer true if the box is entirely below the clip rectangle.
/// Enhance JohnT: Could refine this to skip a box if only its margin is visible.
/// Enhance JohnT: if we do separate page drawing, as in print preview, we may need
/// a more precise way to eliminate boxes not on the page.
/// Enhance JohnT: may need to include a box that is just out of sight, in case exceptionally
/// high stacked diacritics extend above the top of the box?
/// </summary>
internal override bool IsAfterVisibleBoxes(Box box, IVwGraphics vg, PaintTransform ptrans)
{
int left, top, right, bottom;
vg.GetClipRect(out left, out top, out right, out bottom);
return ptrans.ToPaintY(box.Top) > bottom;
}
示例2: FirstVisibleBox
/// <summary>
/// Answer the first box whose bottom comes below the top of the clip rectangle.
/// Enhance JohnT: Could refine this to skip a box if only its margin is visible.
/// Enhance JohnT: if we do separate page drawing, as in print preview, we may need
/// a more precise way to eliminate boxes not on the page.
/// Enhance JohnT: may need to include a box that is just out of sight, in case exceptionally
/// long descenders or stacked diacritics extend below the bottom of the box?
/// </summary>
internal override Box FirstVisibleBox(IVwGraphics vg, PaintTransform ptrans)
{
int left, top, right, bottom;
vg.GetClipRect(out left, out top, out right, out bottom);
for (Box box = FirstBox; box != null; box = box.Next)
if (ptrans.ToPaintY(box.Bottom) > top)
return box;
return null;
}