Font f = new Font("Verdana", 32);
                            Brush b = new SolidBrush(Color.Red);
                            string addText = "aaa";
                            float x = bmpImg.Width / 2;
                            float y = bmpImg.Height / 2;
                            g.DrawString(addText, f, b, x, y);                            g.Dispose();
请问怎样在上面的代码里设置字体透明度????

解决方案 »

  1.   

    f.Style.Add("filter","blendTrans(duration=1) alpha(opacity=35)");
      

  2.   

    不管用呀。我试了f.Style后面没有ADD呀
      

  3.   

    g.DrawString("文字透明", new Font("Arial", 20, FontStyle.Bold), new SolidBrush(Color.FromArgb(80, 255, 255, 255)), 0, 0);
      

  4.   

    也就是你这段改一下
    Brush b = new SolidBrush(Color.Red); 
    Brush b = new SolidBrush(Color.FromArgb(80, 255, 0, 0)); //第一个参数表示透明度
      

  5.   

     用这种方法直接改Color.FromArgb(80, 255, 255, 255)无奈之举呀谢谢了、、、、、