本文整理汇总了C#中Area.GetArea方法的典型用法代码示例。如果您正苦于以下问题:C# Area.GetArea方法的具体用法?C# Area.GetArea怎么用?C# Area.GetArea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area.GetArea方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRadicalShift
/**
* calculate vertical shift of the radical index.
*/
private static float GetRadicalShift(Area radical)
{
// first we need the actual glyph area, this may be either a
// simple glyph, or a compound glyph in a vertical array,
// note we only need the radical portion of the compound glyph
// try the first case, this is a shift area with a
// single glyph area child (from a simple stretchy glyph)
Area glyph = radical.GetArea(new AreaIdentifier(0));
if(glyph is VerticalArea)
{
// the sqrt glyph is allways the bottom, or first element
// in a vertical array, if we have a compound glyph
glyph = radical.GetArea(new AreaIdentifier(new int[] {0,0}));
}
Debug.Assert(glyph is GlyphArea);
// the shift amount is the difference between the total depth,
// and the glyph depth.
return glyph.BoundingBox.Depth - radical.BoundingBox.Depth;
}