fabric簡介(二)

1.插件 textbox的舉例使用 

     var iTextSample = new fabric.Textbox('快來康康', {
         left: 150,
         top: 100,
         fontFamily: 'Helvetica',
         fill: 'yellow', //設置字體顏色
         width: 600,    
         borderColor: 'orange',
         borderScaleFactor: 2,  //border的寬度
         strokeWidth: 2,     //字體描邊的寬度
         stroke: "rgb(0,0,0)",
         //hasBorder:true, //默認就是true
         lineHeight: 1.1,
         fontSize: 40,
         editingBorderColor: "pink", 
         fontWeight: "bolder",
         textAlign: 'center'
     });

     canvas.add(iTextSample);

2.與之相關的插件還有 text  itext 

 

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章