Base interface for all 2D geometric shapes.
All shapes must provide area, perimeter, and transform methods (translate, scale, rotate). Transform methods return new instances (shapes are immutable).
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rotate(
double deg) → Shape -
Rotate the shape by
degdegrees -
scale(
double value) → Shape -
scale the shape by
value -
toString(
) → String -
A string representation of this object.
inherited
-
translate(
{double x = 0, double y = 0}) → Shape -
translate the shape with
xin horizontally andyvertically
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited