arcGeometry method

(Offset, double, double) arcGeometry(
  1. int pane,
  2. GraphMarkSpec m
)

An arc mark's circle on its pane: center, outer radius and the hole's.

Implementation

(Offset, double, double) arcGeometry(int pane, GraphMarkSpec m) {
  final plot = plotRect(pane);
  final box = Rect.fromLTWH(plot.left, plot.top, plot.width + yAxisWidth, plot.height);
  final room = spec.selection.on == 'none' ? 0.0 : spec.selection.grow;
  final outer = math.max(0.0, math.min(box.width, box.height) / 2 - room);
  return (box.center, outer, outer * m.inner.clamp(0.0, 0.98));
}