src/core/BoundingRect.js
function (b) {
        var a = this;
        var sx = b.width / a.width;
        var sy = b.height / a.height;

        var m = matrix.create();

        // 矩阵右乘
        matrix.translate(m, m, [-a.x, -a.y]);
        matrix.scale(m, m, [sx, sy]);
        matrix.translate(m, m, [b.x, b.y]);

        return m;
    }
function (b) {
        var a = this;
        var sx = b.width / a.width;
        var sy = b.height / a.height;

        var m = matrix.create();

        // 矩阵右乘
        matrix.translate(m, m, [-a.x, -a.y]);
        matrix.scale(m, m, [sx, sy]);
        matrix.translate(m, m, [b.x, b.y]);

        return m;
    }
function ( b ) { var a = this ; var sx = b . width / a . width ; var sy = b . height / a . height ; var m = matrix . create ( ) ; // 矩阵右乘 matrix . translate ( m , m , [ - a . x , - a . y ] ) ; matrix . scale ( m , m , [ sx , sy ] ) ; matrix . translate ( m , m , [ b . x , b . y ] ) ; return m ; }
Calculate matrix of transforming from self to target rect
@param  {module:zrender/core/BoundingRect} b
@return {Array.<number>}
Calculate matrix of transforming from self to target rect