提交 5f2e2405 编写于 作者: Z zhangrao

add compnent

Signed-off-by: Nzhangrao <zhangrao@huawei.com>
上级 721c29d9
...@@ -48,7 +48,6 @@ struct CanvasExample { ...@@ -48,7 +48,6 @@ struct CanvasExample {
this.shadowOffsetX(); this.shadowOffsetX();
this.shadowOffsetY(); this.shadowOffsetY();
this.imageSmoothingEnabled(); this.imageSmoothingEnabled();
this.imageSmoothingQuality();
this.fillRect(); this.fillRect();
this.strokeRect(); this.strokeRect();
this.clearRect(); this.clearRect();
...@@ -64,8 +63,6 @@ struct CanvasExample { ...@@ -64,8 +63,6 @@ struct CanvasExample {
this.rect(); this.rect();
this.transform(); this.transform();
this.setTransform(); this.setTransform();
// this.getTransform();
// this.resetTransform();
this.translate(); this.translate();
this.drawImage(); this.drawImage();
this.createImageData(); this.createImageData();
...@@ -82,7 +79,6 @@ struct CanvasExample { ...@@ -82,7 +79,6 @@ struct CanvasExample {
this.getWidth(); this.getWidth();
this.getHeight(); this.getHeight();
this.fill(); this.fill();
this.direction();
this.textMetrics(); this.textMetrics();
this.getBitImageSize(); this.getBitImageSize();
}) })
...@@ -247,9 +243,9 @@ struct CanvasExample { ...@@ -247,9 +243,9 @@ struct CanvasExample {
this.context.drawImage( img, 30, 950, 160, 100); this.context.drawImage( img, 30, 950, 160, 100);
} }
imageSmoothingQuality() { imageSmoothingQuality() {
// let img = new ImageBitmap('/images/img.jpeg'); let img = new ImageBitmap('/images/img.jpeg');
// this.context.imageSmoothingQuality('high'); this.context.imageSmoothingQuality('high');
// this.context.drawImage( img, 30, 950, 160, 100); this.context.drawImage( img, 30, 950, 160, 100);
} }
fillRect() { fillRect() {
this.context.fillRect(10, 1080, 80, 80); this.context.fillRect(10, 1080, 80, 80);
...@@ -357,7 +353,6 @@ struct CanvasExample { ...@@ -357,7 +353,6 @@ struct CanvasExample {
} }
drawImage() { drawImage() {
let img = new ImageBitmap('/images/img.jpeg'); let img = new ImageBitmap('/images/img.jpeg');
// this.context.filter('grayscale(50%)');
this.context.drawImage(img, 0, 0, 500, 500, 0, 1780, 200, 100); this.context.drawImage(img, 0, 0, 500, 500, 0, 1780, 200, 100);
} }
createImageData() { createImageData() {
...@@ -417,8 +412,6 @@ struct CanvasExample { ...@@ -417,8 +412,6 @@ struct CanvasExample {
this.context.arc(20, 2130, 50, 0, 6.28); this.context.arc(20, 2130, 50, 0, 6.28);
this.context.setLineDash([10, 20]); this.context.setLineDash([10, 20]);
this.context.stroke(); this.context.stroke();
// let obj = this.context.getLineDash();
// console.info("[canvas] get line dash----" + JSON.stringify(obj));
} }
toDataURL() { toDataURL() {
let dataUrl = this.context.toDataURL(); let dataUrl = this.context.toDataURL();
...@@ -438,7 +431,7 @@ struct CanvasExample { ...@@ -438,7 +431,7 @@ struct CanvasExample {
this.context.fill('nonzero'); this.context.fill('nonzero');
} }
direction() { direction() {
// this.context.direction('inherit'); this.context.direction('inherit');
} }
textMetrics() { textMetrics() {
this.context.font = '20px sans-serif'; this.context.font = '20px sans-serif';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册