iTextSharp.text.pdf.parser.TextRenderInfo.GetAscentLine C# (CSharp) Метод

GetAscentLine() публичный Метод

public GetAscentLine ( ) : LineSegment
Результат LineSegment
        public LineSegment GetAscentLine()
        {
            float ascent = gs.GetFont().GetFontDescriptor(BaseFont.ASCENT, gs.GetFontSize());
            return GetUnscaledBaselineWithOffset(ascent + gs.rise).TransformBy(textToUserSpaceTransformMatrix);
        }

Usage Example

Пример #1
1
 /// <summary>
 /// Creates a TextStyle object by getting the font name and font size
 /// from a TextRenderInfo object.
 /// </summary>
 /// <param name="textRenderInfo">Object that contains info about a text snippet</param>
 public TextStyle(TextRenderInfo textRenderInfo)
 {
     String font = textRenderInfo.GetFont().FullFontName[0][3];
     if (font.Contains("+"))
         font = font.Substring(font.IndexOf("+") + 1, font.Length - font.IndexOf("+") - 1);
     if (font.Contains("-"))
         font = font.Substring(0, font.IndexOf("-"));
     this.fontName = font;
     this.fontSize = textRenderInfo.GetAscentLine().GetStartPoint()[1] - textRenderInfo.GetDescentLine().GetStartPoint()[1];
 }
All Usage Examples Of iTextSharp.text.pdf.parser.TextRenderInfo::GetAscentLine