渐变色,颜色由中心点向外扩散。效果不怎么好。
   Rect   rect(400, 30,  200, 200);
   GraphicsPath path; 
   path.AddEllipse(rect);      // 构造一个路径 
   PathGradientBrush pthGrBrush(&path);                     // 使用路径构造一个画刷  
   pthGrBrush.SetCenterColor(Color(0, 0, 0));              // 将路径中心颜色设为黑色
   Color colors[] = {Color(255, 255, 255)};                     // 设置路径周围的颜色为白色
   INT count = 1; 
   pthGrBrush.SetSurroundColors(colors, &count); 
   gs.FillEllipse(&pthGrBrush, rect); 
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号