#47; x, y -&gt; translate to ellipse center
  if (point.dx &lt; left + _scaled.tlRadiusX &amp;&amp;
      point.dy &lt; top + _scaled.tlRadiusY) {
    x = point.dx - left - _scaled.tlRadiusX;
    y = point.dy - top - _scaled.tlRadiusY;
    radiusX = _scaled.tlRadiusX;
    radiusY = _scaled.tlRadiusY;
  } else if (point.dx &gt; right - _scaled.trRadiusX &amp;&amp;
             point.dy &lt; top + _scaled.trRadiusY) {
    x = point.dx - right + _scaled.trRadiusX;
    y = point.dy - top - _scaled.trRadiusY;
  