public void FillEllipses(DUIBrush brush, RectangleF[] rects) { foreach (RectangleF rect in rects) { FillEllipse(brush, rect); } }
public void FillRectangles(DUIBrush brush, Rectangle[] rects) { foreach (Rectangle rect in rects) { FillRectangle(brush, rect); } }
public void FillPolygon(DUIBrush brush, PointF[] points) { bool closed = true; if (points == null) { return; } if (points.Length < 3) { return; } brush.RenderTarget = this.target; using (SharpDX.Direct2D1.PathGeometry pathGeometry = new SharpDX.Direct2D1.PathGeometry(this.target.RenderTarget.Factory)) using (SharpDX.Direct2D1.GeometrySink geometrySink = pathGeometry.Open()) { geometrySink.SetFillMode(SharpDX.Direct2D1.FillMode.Alternate); geometrySink.BeginFigure(DxConvert.ToVector2(points[0]), SharpDX.Direct2D1.FigureBegin.Filled); for (int i = 1; i < points.Length; i++) { geometrySink.AddLine(DxConvert.ToVector2(points[i])); } geometrySink.EndFigure(closed ? SharpDX.Direct2D1.FigureEnd.Closed : SharpDX.Direct2D1.FigureEnd.Open); geometrySink.Close(); this.target.RenderTarget.FillGeometry(pathGeometry, brush); } }
public void FillRoundedRectangle(DUIBrush brush, float x, float y, float width, float height, float radius) { if (width == 0 || height == 0) { return; } this.iDUIGraphics.FillRoundedRectangle(brush, x, y, width, height, radius); }
public void FillEllipse(DUIBrush brush, float x, float y, float width, float height) { if (width == 0 || height == 0) { return; } this.iDUIGraphics.FillEllipse(brush, x, y, width, height); }
public void DrawString(string s, DUIFont font, DUIBrush brush, RectangleF layoutRectangle, StringFormat format) { if (string.IsNullOrWhiteSpace(s)) { return; } this.iDUIGraphics.DrawString(s, font, brush, layoutRectangle, format); }
public void FillRoundedRectangle(DUIBrush brush, float x, float y, float width, float height, float radius) { if (width <= 0 || height <= 0) { return; } this.graphics.FillPath(brush, Tools.GetRoundRectangleF(new RectangleF(x, y, width, height), radius)); }
public void FillPolygon(DUIBrush brush, PointF[] points) { if (points == null) { return; } if (points.Length < 3) { return; } this.iDUIGraphics.FillPolygon(brush, points); }
public void DrawString(string s, DUIFont font, DUIBrush brush, RectangleF layoutRectangle, StringFormat format) { brush.RenderTarget = this.target; try { this.target.RenderTarget.DrawText(s, font, DxConvert.ToRectF(new RectangleF(layoutRectangle.X, layoutRectangle.Y, float.MaxValue, 0)), brush); } catch (Exception ex) { Log.DUILog.GettingLog(ex); //这里报错率很高,但不知道为什么 } }
public void DrawString(string s, DUIFont font, DUIBrush brush, PointF p) { DrawString(s, font, brush, p.X, p.Y); }
public void FillRoundedRectangle(DUIBrush brush, float x, float y, float width, float height, float radius) { brush.RenderTarget = this.target; this.target.RenderTarget.FillRoundedRectangle(DxConvert.ToRoundRectF(x, y, width, height, radius), brush); }
public void FillEllipse(DUIBrush brush, float x, float y, float width, float height) { brush.RenderTarget = this.target; this.target.RenderTarget.FillEllipse(DxConvert.ToEllipse(new RectangleF(x, y, width, height)), brush); }
public void FillRegion(DUIBrush brush, DUIRegion region) { this.graphics.FillRegion(brush, region); }
public void DrawString(string s, DUIFont font, DUIBrush brush, RectangleF layoutRectangle, StringFormat format) { this.graphics.DrawString(s, font, brush, layoutRectangle, format); }
public void FillEllipse(DUIBrush brush, float x, float y, float width, float height) { this.graphics.FillEllipse(brush, x, y, width, height); }
public void FillPolygon(DUIBrush brush, PointF[] points) { this.graphics.FillPolygon(brush, points); }
public void FillRoundedRectangle(DUIBrush brush, RectangleF rect, float radius) { this.FillRoundedRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height, radius); }
public void FillEllipse(DUIBrush brush, int x, int y, int width, int height) { this.FillEllipse(brush, (float)x, (float)y, (float)width, (float)height); }
public void FillEllipse(DUIBrush brush, RectangleF rect) { this.FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height); }
public void FillRegion(DUIBrush brush, DUIRegion region) { brush.RenderTarget = this.target; region.RenderTarget = this.target; this.target.RenderTarget.FillGeometry(region, brush); }
public void FillPolygon(DUIBrush brush, Point[] points) { this.FillPolygon(brush, points.Select(p => (PointF)p).ToArray()); }
public void DrawString(string s, DUIFont font, DUIBrush brush, float x, float y) { DrawString(s, font, brush, new RectangleF(new PointF(x, y), MeasureString(s, font)), StringFormat.GenericDefault); }
public void FillRoundedRectangle(DUIBrush brush, int x, int y, int width, int height, float radius) { this.FillRoundedRectangle(brush, (float)x, (float)y, (float)width, (float)height, radius); }