public void FillEllipse(float x, float y, float w, float h, Color c) { this.g.FillEllipse(x, y, w, h, D2DColor.FromGDIColor(c)); }
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)); }
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)); }
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); }
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); }
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(); }
public void DrawString(string text, Font font, Color c, float x, float y) { this.g.DrawText(text, D2DColor.FromGDIColor(c), font, x, y); }
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); }
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); }