2 using System.Drawing;
\r
3 using System.Diagnostics;
\r
4 using System.Windows.Forms;
\r
8 class Method5 : IBench
\r
10 public int fillAreaSize { get { return 0; } }
\r
11 public string methodName { get { return "GDI文字列"; } }
\r
12 public int loopCount { get; set; }
\r
15 ColorTableGDI colors;
\r
17 const string showStr = "D2DBenchMark";
\r
20 public void Init(Control ctrl, bool antialias)
\r
22 ClientSize = ctrl.ClientSize;
\r
23 gdi = new GDI(ctrl);
\r
24 colors = new ColorTableGDI();
\r
31 Random rnd = new Random();
\r
33 for (int j = 0; j < this.loopCount; j++)
\r
35 Color c = colors[rnd.Next(colors.Count - 1)];
\r
36 gdi.DrawString(font, showStr, c, rnd.Next(ClientSize.Width), rnd.Next(ClientSize.Height));
\r
41 public void Dispose()
\r