GeoPolygon class
The GeoPolygon class defines a n-sided polygon. The class may be used to calculate coordinates and paths of a polygon.
Constructors
- GeoPolygon(int sides)
- Creates a new instance of GeoPolygon with n-sides
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- interiorAngle ↔ GeoAngle
-
Interior and internal angles of an n-sided regular polygon
latefinal
- internalAngle ↔ GeoAngle
-
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sides → int
-
Number of sides in a polygon
final
Methods
-
getCoordinates(
{required GeoAngle startAngle, bool clockwise = false, required Size size, BoxFit boxFit = BoxFit.none}) → List< GeoCoordinate2D> -
Get list of coordinates starting at angle
startAngle
inside a rectangle defined bysize
. For regular polygon, make suresize
defines a square with equal dimensions. Note: Depending on resolution, a rectangle may be defined to create the visual appearance of a regular polygon. AnglestartAngle
is defined as start from east direction, and moving counter-clockwise (towards north, west, then south) -
getPath(
{required GeoAngle startAngle, bool clockwise = false, required Size size, BoxFit boxFit = BoxFit.none, double cornerRadius = 0}) → Path -
Get Path for polygon transformed based on start angle
startAngle
, size of drawing area, stretched based onboxFit
with corners rounded with specifiedcornerRadius
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited