Capsule constructor
Capsule(
- ShapeConfig config,
- double radius,
- double height
Capsule shape
config
configuration of the shape
radius
the top and bottom radius of the Capsule
height
the height of the Capsule
Implementation
Capsule(ShapeConfig config, this.radius, this.height):super(config) {
type = Shapes.capsule;
halfHeight = height * 0.5;
start = relativePosition..y += halfHeight;
end = relativePosition..y -= halfHeight;
}