Exemplo n.º 1
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfTextStyle dxfTextStyle = (DxfTextStyle)from;

            this.string_0                 = dxfTextStyle.string_0;
            this.string_1                 = dxfTextStyle.string_1;
            this.string_2                 = dxfTextStyle.string_2;
            this.textStyleFlags_0         = dxfTextStyle.textStyleFlags_0;
            this.textGenerationFlags_0    = dxfTextStyle.textGenerationFlags_0;
            this.double_0                 = dxfTextStyle.double_0;
            this.double_1                 = dxfTextStyle.double_1;
            this.double_2                 = dxfTextStyle.double_2;
            this.double_3                 = dxfTextStyle.double_3;
            this.trueTypeFontDescriptor_0 = dxfTextStyle.trueTypeFontDescriptor_0 == null ? (TrueTypeFontDescriptor)null : (TrueTypeFontDescriptor)dxfTextStyle.trueTypeFontDescriptor_0.Clone();
            if (dxfTextStyle.Handle != 17UL)
            {
                return;
            }
            this.SetHandle(17UL);
        }
Exemplo n.º 2
0
        public TextStyle ToTextStyle()
        {
            int fgNum = Fg;

            if (IsBold && fgNum < 8)
            {
                fgNum += 8;
            }
            Color          fg    = Ansi.AnsiColor256ToColor(fgNum);
            Color          bg    = Ansi.AnsiColor256ToColor(Bg);
            TextStyleFlags flags = TextStyleFlags.Empty;

            if (IsBold)
            {
                flags |= TextStyleFlags.HighIntensity;
            }
            if (IsInverse)
            {
                flags |= TextStyleFlags.Inverse;
            }
            return(new TextStyle(fg, bg, flags));
        }
Exemplo n.º 3
0
 public TextStyle(Color fg, Color bg, TextStyleFlags flags)
 {
     m_fgColor = fg;
     m_bgColor = bg;
     m_flags   = flags;
 }
Exemplo n.º 4
0
 public TextStyle(TextStyleFlags flags)
 {
     m_flags = flags;
 }
Exemplo n.º 5
0
 public TextStyle(TextStyle style)
 {
     m_fgColor = style.m_fgColor;
     m_bgColor = style.m_bgColor;
     m_flags   = style.m_flags;
 }
Exemplo n.º 6
0
 public FormatInfo(TextStyleFlags textStyle, Brush foreground)
 {
     settings.Add(FormatInfoParameters.TextStyleFlags, textStyle);
     settings.Add(FormatInfoParameters.ForegroundColor, foreground);
 }
Exemplo n.º 7
0
 public FormatInfo(TextStyleFlags textStyle)
 {
     settings.Add(FormatInfoParameters.TextStyleFlags, textStyle);
 }