コード例 #1
0
 public void FillEllipse(float x, float y, float w, float h, Color c)
 {
     this.g.FillEllipse(x, y, w, h, D2DColor.FromGDIColor(c));
 }
コード例 #2
0
        public void DrawPolygon(PointF[] ps, Color strokeColor, float weight, Color fillColor)
        {
            D2DPoint[] pt = new D2DPoint[ps.Length];

            for (int i = 0; i < ps.Length; i++)
            {
                pt[i] = new D2DPoint(ps[i].X, ps[i].Y);
            }

            this.g.DrawPolygon(pt, D2DColor.FromGDIColor(strokeColor), weight, D2DDashStyle.Solid, D2DColor.FromGDIColor(fillColor));
        }
コード例 #3
0
 public void FillRectangle(float x, float y, float w, float h, Color c)
 {
     this.g.FillRectangle(new D2DRect(x, y, w, h), D2DColor.FromGDIColor(c));
 }
コード例 #4
0
 public void DrawEllipse(float x, float y, float w, float h, Color c, float weight = 1f)
 {
     this.g.DrawEllipse(x, y, w, h, D2DColor.FromGDIColor(c), weight);
 }
コード例 #5
0
 public void DrawLine(float x1, float y1, float x2, float y2, Color c, float weight = 1f)
 {
     this.g.DrawLine(x1, y1, x2, y2, D2DColor.FromGDIColor(c), weight);
 }
コード例 #6
0
 public override void OnPaint(Point offSet)
 {
     bg.BeginRender();
     bg.FillRectangle(offSet.X, offSet.Y, this.Size.Width, this.Size.Height, D2DColor.FromGDIColor(Color.FromArgb(230, 225, 225, 225)));
     for (var i = 15; i < gitColor.Count; i++)
     {
         for (var j = 0; j < gitColor[i].Count; j++)
         {
             bg.FillRectangle(offSet.X + 13 * (i - 15) + 3, offSet.Y + 13 * j + 3, 10, 10, D2DColor.FromGDIColor(gitColor[i][j]));
         }
     }
     isRender = false;
     bg.EndRender();
 }
コード例 #7
0
ファイル: D2DHybridForm.cs プロジェクト: xstos/d2dlib
 public void DrawString(string text, Font font, Color c, float x, float y)
 {
     this.g.DrawText(text, D2DColor.FromGDIColor(c), font, x, y);
 }
コード例 #8
0
ファイル: Extensions.cs プロジェクト: yply/d2dlib
        public static void DrawText(this D2DGraphics g, string text, D2DColor color, Font font, PointF location)
        {
            var rect = new D2DRect(location.X, location.Y, 9999999, 9999999);

            g.DrawText(text, color, font.Name, font.Size * 96f / 72f, rect);
        }
コード例 #9
0
ファイル: Extensions.cs プロジェクト: yply/d2dlib
        public static void DrawText(this D2DGraphics g, string text, D2DColor color, Font font, float x, float y)
        {
            var rect = new D2DRect(x, y, 9999999, 9999999);

            g.DrawText(text, color, font.Name, font.Size * 96f / 72f, rect);
        }