コード例 #1
0
        public void AddText(string text, int x, int y, Font font, int fontSize, Color color)
        {
            Type1Font    t1  = font as Type1Font;
            TrueTypeFont ttf = font as TrueTypeFont;

            if (t1 != null)
            {
                AddText(text, x, y, t1, fontSize, color);
            }
            else if (ttf != null)
            {
                AddText(text, x, y, ttf, fontSize, color);
            }
        }
コード例 #2
0
        public void AddText(
            string text, int x, int y,
            string fontFamily, bool bold, bool italic, int fontSize,
            Color color)
        {
            Font         font = _fonts.GetFont(fontFamily, bold, italic);
            Type1Font    t1   = font as Type1Font;
            TrueTypeFont ttf  = font as TrueTypeFont;

            if (t1 != null)
            {
                AddText(text, x, y, t1, fontSize, color);
            }
            else if (ttf != null)
            {
                AddText(text, x, y, ttf, fontSize, color);
            }
        }
コード例 #3
0
        private void AddText(string text, int x, int y, Type1Font font, int fontSize, Color color)
        {
            Text t = new Text(text, x, y, font, fontSize, color);

            _content.Add(t);
        }