C#画图消除锯齿

 using (Graphics g = this.CreateGraphics())
          {
              g.SmoothingMode = SmoothingMode.HighQuality;  //图片柔顺模式选择
              g.InterpolationMode = InterpolationMode.HighQualityBicubic;//高质量
              g.CompositingQuality = CompositingQuality.HighQuality;//再加一点
              Point topLeft = new Point(5, 5);
              Size howBig = new Size(sdict.Keys.Count * 80, 5);
              Rectangle rectangleArea = new Rectangle(topLeft, howBig);
              int x = 10;
              foreach (var item in sdict.Keys)
              {
                  g.DrawEllipse(p2, x,20,20,20);
                  g.DrawString(sdict[item], f1, Brushes.Black, new PointF(x, 80));
                  x = x + 80;
              }
 
          }

 

posted @ 2015-07-06 11:09  如.若  阅读(4183)  评论(0编辑  收藏  举报