Good day. I draw my control in WinForms. In Figure 3, a rectangle, at the central Alpha channel 255, at the top and bottom 100.
Here is the result:
For display I use Rectangle. I use color constant, only the alpha channel component changes. I set the color through Color.FromARGB(a,r,g,b); I use a permanent font.
How to make sure that the text does not blur, if my background is a little transparent?
The smaller the alpha channel is, the more the text is blurred (it is not bold, it is normal).
Here is a sample code:
var rect = new Rectangle(locat, sizeRect); Color rectColor = (t[j].RectColor != null) ? (Color)t[j].RectColor : defaultRectColor; g.FillRectangle(new SolidBrush(rectColor), rect); Font font = t[j].RectFont != null ? (Font)t[j].RectFont : this.Font; var textcolor = t[j].TextColor != null ? (Color)t[j].TextColor : this.ForeColor; g.DrawString(t[j].Description, font, new SolidBrush(textcolor), rect);
t[]. - IldardefaultRectColor,t[j].TextColor,this.ForeColor- Ildar