code: function(quad, ratioX, ratioY)
      {
          var x0 = quad[0];
          var y0 = quad[1];
          var x1 = quad[2];
          var y1 = quad[3];
          var x2 = quad[4];
          var y2 = quad[5];
          var x3 = quad[6];
          var y3 = quad[7];
          // Point on the first quad side clockwise
          var firstSidePointX = x0 + ratioX * (x1 - x0);
          var firstSidePointY = y0 + ratioX * (y1 - y0);
          // Point on the third quad side clockwise
          var thirdSidePointX = x3 + ratioX * (x2 - x3);
          var thirdSidePointY = y3 + ratioX * (y2 - y3);
          var x = firstSidePointX + ratioY * (thirdSidePointX - firstSidePointX);
          var y = firstSidePointY + ratioY * (thirdSidePointY - firstSidePointY);
          return [x, y];
      }
docs: Finds coordinates of point on layer quad, having offsets (ratioX * width) and (ratioY * height)
  from the left corner of the initial layer rect, where width and heigth are layer bounds.
  @param {!Array.<number>} quad
  @param {number} ratioX
  @param {number} ratioY
  @return {!Array.<number>}