arc method

Drawable arc(
  1. double x,
  2. double y,
  3. double width,
  4. double height,
  5. double start,
  6. double stop, [
  7. bool closed = false,
])

Draws an arc. An arc is described as a section of an ellipse.

  • x, y represents the center of that ellipse
  • width, height are the dimensions of that ellipse.
  • start, stop are the start and stop angles for the arc.
  • closed is a boolean argument. If true, lines are drawn to connect the two end points of the arc to the center.

Implementation

Drawable arc(double x, double y, double width, double height, double start,
    double stop,
    [bool closed = false]) {
  final OpSet outline = OpSetBuilder.arc(
      PointD(x, y), width, height, start, stop, closed, true, drawConfig!);
  final List<PointD> fillPoints = OpSetBuilder.arcPolygon(
      PointD(x, y), width, height, start, stop, drawConfig!);
  return _buildDrawable(outline, fillPoints);
}