Example #1
0
    public void printDrawString(Graphics e, string text, Font fnt, Color textColor, Rectangle rect, bool shadow, Point distance)
    {
        if (shadow)
        {
            RbControls_PixelTextShadow _Txtshadow = new RbControls_PixelTextShadow();
            _Txtshadow.Draw(e, text, fnt, new PointF(rect.X + distance.X, rect.Y + distance.Y));
        }
        e.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
        SolidBrush _brush = new SolidBrush(textColor);

        e.DrawString(text, fnt, _brush, rect);
    }
Example #2
0
    public void DrawString(Bitmap _bmp, string text, Font fnt, Color textColor, Rectangle rect, bool shadow, Point distance)
    {
        Graphics txt_bmp = Graphics.FromImage(_bmp);

        if (shadow)
        {
            RbControls_PixelTextShadow _Txtshadow = new RbControls_PixelTextShadow();
            _Txtshadow.Draw(txt_bmp, text, fnt, new PointF(rect.X + distance.X, rect.Y + distance.Y));
        }
        txt_bmp.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
        SolidBrush _brush = new SolidBrush(textColor);

        txt_bmp.DrawString(text, fnt, _brush, rect);
    }