translate method

  1. @override
Capsule translate({
  1. double x = 0,
  2. double y = 0,
})
override

translate the shape with x in horizontally and y vertically

Implementation

@override
Capsule translate({double x = 0, double y = 0}) {
  return Capsule(
    medialAxis: Line(
      medialAxis.a.translate(x, y),
      medialAxis.b.translate(x, y),
    ),
    radius: radius,
  );
}