getPoint static method
Get a GPoint instance from the pool. If the pool is empty, a new GPoint object is created and returned.
Implementation
static GPoint getPoint([double x = 0, double y = 0]) {
if (_points.isEmpty) {
return GPoint(x, y);
}
return _points.removeLast()
..x = x
..y = y;
}