sizeToVertices static method
Implementation
@protected
static List<Vector2> sizeToVertices(
Vector2 size,
Anchor? componentAnchor,
) {
final anchor = componentAnchor ?? Anchor.topLeft;
return [
Vector2(-size.x * anchor.x, -size.y * anchor.y),
Vector2(-size.x * anchor.x, size.y - size.y * anchor.y),
Vector2(size.x - size.x * anchor.x, size.y - size.y * anchor.y),
Vector2(size.x - size.x * anchor.x, -size.y * anchor.y),
];
}