一段文字透明的代码

 gc.SetPenColor(TRgb(255,0,0,20));
    gc.SetBrushStyle(CGraphicsContext::ENullBrush);
    gc.SetPenStyle(CGraphicsContext::ESolidPen);
    gc.UseFont(ClockBold30());
    gc.DrawText(_L("8888888"),TPoint(100,100));
   
    TRect at(TPoint(50,50),TSize(50,50));
   
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.SetBrushColor(TRgb(255,0,0,20));
   
    gc.DrawRect(at);
   
 // Clears the screen
 gc.SetBrushStyle(CGraphicsContext::ENullBrush);
 gc.SetPenStyle(CGraphicsContext::ESolidPen);
 gc.SetPenColor(TRgb(255,0,0,20));
 const CFont* font = iEikonEnv->NormalFont();
 TBuf<32> buf;
 buf.Append(_L("ABCD"));
 gc.UseFont(font);
 gc.DrawText(buf,TPoint(4,31));
 gc.DiscardFont();
posted @ 2010-08-20 14:23  zziss  阅读(768)  评论(0编辑  收藏  举报