font() public method

public font ( text_part print ) : Font
print text_part
return System.Drawing.Font
Exemplo n.º 1
0
        private void draw_sub_string(int left, string sub, Graphics g, Brush b, Rectangle r, StringFormat fmt, text_part print)
        {
            int   width    = drawer_.text_width(g, sub, drawer_.font(print));
            Color print_bg = drawer_.print_bg_color(ListItem, print);

            if (print_bg.ToArgb() != bg_color_.ToArgb())
            {
                Rectangle here = new Rectangle(r.Location, r.Size);
                here.X    += left;
                here.Width = width + 1;
                g.FillRectangle(brush_.brush(print_bg), here);
            }

            Rectangle sub_r = new Rectangle(r.Location, r.Size);

            sub_r.X     += left;
            sub_r.Width -= left;
            g.DrawString(sub, drawer_.font(print), brush_.brush(drawer_.print_fg_color(ListItem, print)), sub_r, fmt);
        }
Exemplo n.º 2
0
        private void draw_sub_string(int left, string sub, Graphics g, Brush b, Rectangle r, StringFormat fmt, print_info print)
        {
            int width = text_width(g, sub);

            if (print != default_print_)
            {
                Rectangle here = new Rectangle(r.Location, r.Size);
                here.X    += left;
                here.Width = width + 1;
                g.FillRectangle(brush_.brush(print.bg), here);
            }

            Rectangle sub_r = new Rectangle(r.Location, r.Size);

            sub_r.X     += left;
            sub_r.Width -= left;
            g.DrawString(sub, drawer_.font(print), brush_.brush(print.fg), sub_r, fmt);
        }