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 

 

  

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