translate method
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,
);
}