示例#1
0
 private void setJustify(ParagraphJust justify)
 {
     if (justify != styleSet.Last().Value.justification&& rTxtCtrl.TextLength > styleSet.Last().Key)
     {
         StyleInfo newStyle = new StyleInfo(styleSet.Last().Value);
         newStyle.justification = justify;
         styleSet.Add(rTxtCtrl.TextLength, newStyle);
     }
     else
     {
         styleSet.Last().Value.justification = justify;
     }
 }
示例#2
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="style"></param>
 public StyleInfo(StyleInfo style)
 {
     typeFace      = style.typeFace;
     typeSize      = style.typeSize;
     typeCompress  = style.typeCompress;
     typeBaseline  = style.typeBaseline;
     isUnderline   = style.isUnderline;
     isBold        = style.isBold;
     isItalic      = style.isItalic;
     isOutline     = style.isOutline;
     shade         = style.shade;
     justification = style.justification;
     lineSpacing   = style.lineSpacing;
 }
示例#3
0
        public float lineSpacing;      // 0.75, 1.0, 1.5, 2.0, 2.5 or 3.0


        /// <summary>
        /// Default settings constructor
        /// </summary>
        public StyleInfo()
        {
            typeFace      = Face.Courier;
            typeSize      = 12;
            typeCompress  = Compress.Normal;
            typeBaseline  = Baseline.Regular;
            isUnderline   = false;
            isBold        = false;
            isItalic      = false;
            isOutline     = false;
            shade         = Shading.None;
            justification = ParagraphJust.Left;
            lineSpacing   = 1.0f;
        }