Shape class abstract interface

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).

Implementers

Properties

area double
Area of this shape.
no setter
hashCode int
The hash code for this object.
no setterinherited
perimeter double
Perimeter (circumference) of this shape.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rotate(double deg) Shape
Rotate the shape by deg degrees
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 x in horizontally and y vertically

Operators

operator ==(Object other) bool
The equality operator.
inherited