Skip to content

Commit 6ee0a43

Browse files
committed
del commit
1 parent 474b85f commit 6ee0a43

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

consistency_hash/js/canvas.js

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,16 @@
3030

3131
//绘制图片
3232
Canvas.prototype.drawImg = function(){
33-
var _this = this;
34-
var img = new Image();
35-
img.src = '../img/rhino.jpg';
33+
var _this = this;
34+
var img = new Image();
35+
img.src = '../img/rhino.jpg';
3636
img.onload = function(){
37-
//_this.ctx.drawImage(img,0,0);
38-
_this.ctx.transform(1,1,0,1,0,0);
39-
_this.ctx.drawImage(img,50,50,100,100);
40-
//_this.ctx.drawImage(img,10,10,100,100,10,10,100,100);
41-
//_this.ctx.drawImage(img,10,10,100,100,150,150,1000,1000);
42-
37+
//_this.ctx.drawImage(img,0,0);
38+
_this.ctx.transform(1,1,0,1,0,0);
39+
_this.ctx.drawImage(img,50,50,100,100);
40+
//_this.ctx.drawImage(img,10,10,100,100,10,10,100,100);
41+
//_this.ctx.drawImage(img,10,10,100,100,150,150,1000,1000);
4342
}
44-
//参数值
45-
//参数值 描述
46-
//img 规定要使用的图像、画布或视频。
47-
//sx 可选。开始剪切的 x 坐标位置。
48-
//sy 可选。开始剪切的 y 坐标位置。
49-
//swidth 可选。被剪切图像的宽度。
50-
//sheight 可选。被剪切图像的高度。
51-
//x 在画布上放置图像的 x 坐标位置。
52-
//y 在画布上放置图像的 y 坐标位置。
53-
//width 可选。要使用的图像的宽度。(伸展或缩小图像)
54-
//height 可选。要使用的图像的高度。(伸展或缩小图像)
55-
5643
}
5744

5845
/**

0 commit comments

Comments
 (0)