コード例 #1
0
        public void AddStyle(string StyleName, string FontName, int FontZise, bool Bold, bool Italic, bool Center, int LineHeight, int LineSpacing, PDFColumnBorder Borders)
        {
            XFontStyle xfs = XFontStyle.Regular;

            if (Bold && Italic)
            {
                xfs = XFontStyle.BoldItalic;
            }
            else
            {
                if (Bold)
                {
                    xfs = XFontStyle.Bold;
                }

                if (Italic)
                {
                    xfs = XFontStyle.Italic;
                }
            }

            styles.Add(new PDFStyle()
            {
                StyleName   = StyleName,
                Font        = new XFont(FontName, FontZise, xfs),
                LineHeight  = LineHeight,
                LineSpacing = LineSpacing,
                Center      = Center,
                Borders     = Borders
            });
        }
コード例 #2
0
 public void AddStyle(string StyleName, string FontName, int FontZise, bool Bold, bool Italic, bool Center, PDFColumnBorder Borders)
 {
     AddStyle(StyleName, FontName, FontZise, Bold, Italic, Center, (int)((double)FontZise / 0.6), 0, Borders);
 }