function StepCanvas(canvas, stepParams, padding) {
        this.canvas     = canvas;
        this.stepParams = stepParams;
        this.padding    = this.getPadding(padding);

        // Convert to a cartesian coordinate system with axes from 0 to 1
        var ctx = this.canvas.getContext("2d"),
            p = this.padding;

        ctx.scale(canvas.width * (1 - p[1] - p[3]), -canvas.height * (1 - p[0] - p[2]));
        ctx.translate(p[3] / (1 - p[1] - p[3]), (-1 - p[0] / (1 - p[0] - p[2])));
    }
function StepCanvas(canvas, stepParams, padding) {
        this.canvas     = canvas;
        this.stepParams = stepParams;
        this.padding    = this.getPadding(padding);

        // Convert to a cartesian coordinate system with axes from 0 to 1
        var ctx = this.canvas.getContext("2d"),
            p = this.padding;

        ctx.scale(canvas.width * (1 - p[1] - p[3]), -canvas.height * (1 - p[0] - p[2]));
        ctx.translate(p[3] / (1 - p[1] - p[3]), (-1 - p[0] / (1 - p[0] - p[2])));
    }
function StepCanvas ( canvas , stepParams , padding ) { this . canvas = canvas ; this . stepParams = stepParams ; this . padding = this . getPadding ( padding ) ; // Convert to a cartesian coordinate system with axes from 0 to 1 var ctx = this . canvas . getContext ( "2d" ) , p = this . padding ; ctx . scale ( canvas . width * ( 1 - p [ 1 ] - p [ 3 ] ) , - canvas . height * ( 1 - p [ 0 ] - p [ 2 ] ) ) ; ctx . translate ( p [ 3 ] / ( 1 - p [ 1 ] - p [ 3 ] ) , ( - 1 - p [ 0 ] / ( 1 - p [ 0 ] - p [ 2 ] ) ) ) ; }
StepCanvas object constructor

@param {Element} canvas Inline editor <canvas> element
@param {StepParameters} stepParams Associated StepParameters object
@param {number|Array.number} padding Element padding
StepCanvas object constructor
StepCanvas constructor.