function transformPoint(matrix, x, y) {

    return [
        matrix[0] * x + matrix[2] * y + matrix[4],
        matrix[1] * x + matrix[3] * y + matrix[5]
    ];

}
Apply transform 3x3 matrix to x-y point.

@param {Array} matrix transform 3x3 matrix
@param {Array} point x-y point
@return {Array} point with new coordinates