RenderText() публичный статический Метод

public static RenderText ( Graphics gr, string text, int x, Color fillColor, Color textColor, Color traceColor, int maxHeight = -1, int y = 4, Font font = null, bool center = false, InterpolationMode interpolationMode = InterpolationMode.High, SmoothingMode smoothingMode = SmoothingMode.HighQuality ) : void
gr Graphics
text string
x int
fillColor Color
textColor Color
traceColor Color
maxHeight int
y int
font Font
center bool
interpolationMode InterpolationMode
smoothingMode SmoothingMode
Результат void
Пример #1
0
        protected override void OnPaint(PaintEventArgs e)
        {
            int x = 5;

            if (!reverse)
            {
                x = (int)(this.Width - 10 - this.Text.Length * this.Font.Size);
            }
            if (centerText)
            {
                x = (int)(this.Width / 2);
            }
            SummaryForm.RenderText(e.Graphics, this.Text, x, Color.Empty, StyleManager.NotificationTextColor, Color.FromArgb(0, 0, 0), this.Height, 4, this.Font, true, System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor, backColor == StyleManager.TransparencyKey ? System.Drawing.Drawing2D.SmoothingMode.None : System.Drawing.Drawing2D.SmoothingMode.HighQuality);
        }
Пример #2
0
 protected override void OnPaint(PaintEventArgs e)
 {
     SummaryForm.RenderText(e.Graphics, this.Text, 5, Color.Empty, StyleManager.NotificationTextColor, Color.FromArgb(64, 64, 64), this.Height, 4, this.Font, true, System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor, backColor == StyleManager.TransparencyKey ? System.Drawing.Drawing2D.SmoothingMode.None : System.Drawing.Drawing2D.SmoothingMode.HighQuality);
 }