private void FillArcSegment(ICanvas canvas) { canvas.StrokeColor = Colors.LightGrey; canvas.DrawRectangle(350.5f, 50.5f, 50, 50); var path = new PathF(); path.AddArc(350.5f, 50.5f, 400.5f, 100.5f, 45f, 135, false); canvas.FillColor = Colors.Black; canvas.FillPath(path); }
private void DrawArc(ICanvas canvas, float x, float y, float width, float height, float startAngle, float endAngle, bool clockwise, bool closed) { canvas.FillColor = Colors.Black; canvas.FillArc(x, y, width, height, startAngle, endAngle, clockwise); var path = new PathF(); path.AddArc(x, y + 400, x + width, y + 400 + width, startAngle, endAngle, clockwise); path.Close(); canvas.FillPath(path); }
void AddArc(PathF path, ArcSegment arcSegment) { path.AddArc( (float)arcSegment.Point.X, (float)arcSegment.Point.Y, (float)arcSegment.Point.X + (float)arcSegment.Size.Width, (float)arcSegment.Point.Y + (float)arcSegment.Size.Height, (float)arcSegment.RotationAngle, (float)arcSegment.RotationAngle, arcSegment.SweepDirection == SweepDirection.Clockwise); }
void AddArc(PathF path, ArcSegment arcSegment, double density) { path.AddArc( (float)(density * arcSegment.Point.X), (float)(density * arcSegment.Point.Y), (float)(density * arcSegment.Point.X + density * arcSegment.Size.Width), (float)(density * arcSegment.Point.Y + density * arcSegment.Size.Height), (float)(density * arcSegment.RotationAngle), (float)(density * arcSegment.RotationAngle), arcSegment.SweepDirection == SweepDirection.Clockwise); }
private void FillPie(ICanvas canvas) { canvas.StrokeColor = Colors.LightGrey; canvas.DrawRectangle(350.5f, 150.5f, 50, 50); var path = new PathF(); path.AddArc(350.5f, 150.5f, 400.5f, 200.5f, 45f, 135, false); path.LineTo(375.5f, 200.5f); path.Close(); canvas.FillColor = Colors.Black; canvas.FillPath(path); }
private void DrawArc(ICanvas canvas, float x, float y, float width, float height, float startAngle, float endAngle, bool clockwise, bool closed) { if (includeOvals) { canvas.StrokeColor = Colors.LightGrey; canvas.DrawOval(x, y, width, height); } canvas.StrokeColor = Colors.Black; canvas.DrawArc(x, y, width, height, startAngle, endAngle, clockwise, closed); var path = new PathF(); path.AddArc(x, y + 400, x + width, y + 400 + width, startAngle, endAngle, clockwise); canvas.DrawPath(path); }