lundi 2 novembre 2015

How to work with units like inch & mm in fabric js

I am working on a fabric js application & i need work with measurement units like inches & mm
I tried this code & it display blank
So my question is how work with units like inch & mm in fabric js

a = new fabric.Rect({ 
            top:0,
            left:0 ,
            fill: '#000',
            width: 50mm,
            height: 50mm,
           
        });
b = new fabric.Rect({   
            top:0,
            left:200,   
            fill: '#000',
            width: 1in,
            height: 1in,
           
        });
    canvas.add(a, b);
<canvas id='canvas' width="500" height="400" style="border:#000 1px solid;"></canvas>

Aucun commentaire:

Enregistrer un commentaire