Esempio n. 1
0
 /// <summary>
 /// Applies specified formatting to the text.
 /// </summary>
 /// <param name="formatting">Character formatting to apply.</param>
 public void SetFormatting(RtfCharacterFormatting formatting)
 {
     Bold        = (formatting & RtfCharacterFormatting.Bold) == RtfCharacterFormatting.Bold;
     Italic      = (formatting & RtfCharacterFormatting.Italic) == RtfCharacterFormatting.Italic;
     Underline   = (formatting & RtfCharacterFormatting.Underline) == RtfCharacterFormatting.Underline;
     Subscript   = (formatting & RtfCharacterFormatting.Subscript) == RtfCharacterFormatting.Subscript;
     Superscript = (formatting & RtfCharacterFormatting.Superscript) == RtfCharacterFormatting.Superscript;
     Caps        = (formatting & RtfCharacterFormatting.Caps) == RtfCharacterFormatting.Caps;
     SmallCaps   = (formatting & RtfCharacterFormatting.SmallCaps) == RtfCharacterFormatting.SmallCaps;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfFormattedText class.
 /// </summary>
 /// <param name="text">String value to set as text.</param>
 /// <param name="formatting">Character formatting to apply to the text.</param>
 /// <param name="fontIndex">Index of an entry in the font table.</param>
 public RtfFormattedText(string text, RtfCharacterFormatting formatting, int fontIndex, float fontSize) : base(text)
 {
     SetFormatting(formatting);
     _fontSize  = fontSize;
     _fontIndex = fontIndex;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfFormattedText class.
 /// </summary>
 /// <param name="text">String value to set as text.</param>
 /// <param name="formatting">Character formatting to apply to the text.</param>
 public RtfFormattedText(string text, RtfCharacterFormatting formatting) : base(text)
 {
     SetFormatting(formatting);
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfFormattedText class.
 /// </summary>
 /// <param name="text">String value to set as text.</param>
 /// <param name="formatting">Character formatting to apply to the text.</param>
 /// /// <param name="colorIndex">Index of an entry in the color table.</param>
 public RtfFormattedText(string text, RtfCharacterFormatting formatting, int colorIndex) : base(text)
 {
     SetFormatting(formatting);
     _colorIndex = colorIndex;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfFormattedText class.
 /// </summary>
 /// <param name="formatting">Character formatting to apply to the text.</param>
 public RtfFormattedText(RtfCharacterFormatting formatting) : base()
 {
     SetFormatting(formatting);
 }