| | |
| | | startY: 0,
|
| | | width: 30,
|
| | | height: 30,
|
| | | lineWidth: 4,
|
| | | fontSize: 14,
|
| | | fontWeight: '',
|
| | | strokeStyle: '#000',
|
| | | fillStyle: '#000',
|
| | | isShow: true,
|
| | | name:'',
|
| | | id: '',
|
| | |
| | |
|
| | | var opts = $.extend({}, defaluts, options || {});
|
| | |
|
| | | if(opts.img != '')
|
| | | this.context.drawImage(opts.img, opts.startX-30, opts.startY-3, 65, 105);
|
| | | if(opts.img != '' && opts.isShow) {
|
| | | this.context.drawImage(opts.img, opts.startX, opts.startY, opts.width, opts.height);
|
| | | |
| | | this.context.lineWidth = opts.lineWidth;
|
| | | this.context.strokeStyle = opts.strokeStyle;
|
| | | this.context.fillStyle = opts.fillStyle;
|
| | | this.context.font = opts.fontSize+'px Arial';
|
| | | this.context.fillText(opts.name, opts.startX+30, opts.startY+25);
|
| | | }
|
| | | |
| | | // 存储内容
|
| | | var txtInfor = {
|
| | | options: opts,
|
| | | type:'drawImg',
|
| | | };
|
| | | this.opts.push(txtInfor);
|
| | | |
| | | |
| | | };
|
| | |
|
| | | // 重新绘制图
|