resolvePosition static method

Position resolvePosition(
  1. Position? pos,
  2. num? x,
  3. num? y, {
  4. PCanvasElement? element,
})

Implementation

static Position resolvePosition(Position? pos, num? x, num? y,
    {PCanvasElement? element}) {
  if (pos != null) {
    if (element != null) {
      PCanvasElement.resolveWithElement(pos, element);
    }
    return pos;
  }

  if (x == null || y == null) {
    return Point.pZero;
  }

  return Point(x, y);
}