positionOfAnchor method

Vector2 positionOfAnchor(
  1. Anchor anchor
)
inherited

Similar to positionOf(), but applies to any anchor point within the component.

Implementation

Vector2 positionOfAnchor(Anchor anchor) {
  if (anchor == _anchor) {
    return position;
  }
  return positionOf(Vector2(anchor.x * size.x, anchor.y * size.y));
}