Example #1
0
            public override void Write(FileWriter writer, LayoutHeader header)
            {
                long pos = writer.Position;

                base.Write(writer, header);
                writer.Write(TextLength);
                writer.Write(MaxTextLength);
                writer.Write(MaterialIndex);
                writer.Write(FontIndex);
                writer.Write(TextAlignment);
                writer.Write(LineAlignment, false);
                writer.Write(_flags);
                writer.Seek(1);
                long _ofsTextPos = writer.Position;

                writer.Write(0); //text offset
                writer.Write(FontForeColor.ToBytes());
                writer.Write(FontBackColor.ToBytes());
                writer.Write(FontSize);
                writer.Write(CharacterSpace);
                writer.Write(LineSpace);

                writer.WriteUint32Offset(_ofsTextPos, pos);
                if (RestrictedTextLengthEnabled)
                {
                    writer.WriteString(Text, MaxTextLength);
                }
                else
                {
                    writer.WriteString(Text, TextLength);
                }
            }
Example #2
0
 public static string FontBackground(this string input, FontBackColor color)
 {
     return("\x1b[" + (int)color + "m" + input + "\x1b[" + (int)FontBackColor.RESET + "m");
 }
Example #3
0
 public static string FontBackground(this string input, FontBackColor color)
 {
     return ("\x1b[" + (int)color + "m" + input + "\x1b[" + (int)FontBackColor.RESET + "m");
 }