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


C# IVwGraphics.GetClipRect方法代码示例

本文整理汇总了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;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:14,代码来源:DivBox.cs

示例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;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:17,代码来源:DivBox.cs


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