## CanvasRenderingContext2D

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.description -->

参考：[canvas组件](../component/canvas.md)

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.extends -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.param -->



<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.example -->

### CanvasRenderingContext2D 的方法 @canvasrenderingcontext2d-methods

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arc.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arc.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arc.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arc.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arc.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arc.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arcTo.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arcTo.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arcTo.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arcTo.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arcTo.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.arcTo.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.beginPath.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.beginPath.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.beginPath.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.beginPath.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.beginPath.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.beginPath.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.bezierCurveTo.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.bezierCurveTo.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.bezierCurveTo.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.bezierCurveTo.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.bezierCurveTo.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.bezierCurveTo.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clearRect.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clearRect.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clearRect.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clearRect.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clearRect.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clearRect.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_1.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_1.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_1.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_1.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_1.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_1.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_2.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_2.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_2.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_2.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_2.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_2.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_3.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_3.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_3.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_3.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_3.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.clip_3.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.closePath.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.closePath.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.closePath.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.closePath.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.closePath.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.closePath.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createImageData.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createImageData.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createImageData.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createImageData.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createImageData.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createImageData.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createPattern.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createPattern.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createPattern.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createPattern.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createPattern.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createPattern.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createLinearGradient.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createLinearGradient.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createLinearGradient.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createLinearGradient.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createLinearGradient.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createLinearGradient.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createRadialGradient.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createRadialGradient.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createRadialGradient.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createRadialGradient.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createRadialGradient.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.createRadialGradient.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.draw.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.draw.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.draw.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.draw.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.draw.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.draw.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_1.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_1.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_1.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_1.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_1.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_1.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_2.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_2.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_2.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_2.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_2.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.drawImage_2.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.ellipse.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.ellipse.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.ellipse.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.ellipse.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.ellipse.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.ellipse.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_1.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_1.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_1.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_1.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_1.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_1.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_2.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_2.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_2.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_2.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_2.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_2.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_3.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_3.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_3.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_3.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_3.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fill_3.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillRect.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillRect.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillRect.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillRect.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillRect.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillRect.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillText.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillText.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillText.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillText.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillText.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.fillText.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getImageData.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getImageData.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getImageData.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getImageData.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getImageData.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getImageData.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isContextLost.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isContextLost.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isContextLost.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isContextLost.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isContextLost.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isContextLost.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_1.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_1.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_1.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_1.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_1.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_1.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_2.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_2.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_2.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_2.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_2.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_2.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_3.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_3.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_3.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_3.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_3.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInPath_3.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInStroke.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInStroke.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInStroke.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInStroke.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInStroke.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.isPointInStroke.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getLineDash.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getLineDash.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getLineDash.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getLineDash.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getLineDash.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.getLineDash.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.lineTo.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.lineTo.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.lineTo.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.lineTo.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.lineTo.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.lineTo.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.measureText.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.measureText.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.measureText.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.measureText.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.measureText.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.measureText.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.moveTo.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.moveTo.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.moveTo.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.moveTo.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.moveTo.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.moveTo.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData_1.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData_1.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData_1.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData_1.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData_1.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.putImageData_1.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.quadraticCurveTo.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.quadraticCurveTo.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.quadraticCurveTo.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.quadraticCurveTo.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.quadraticCurveTo.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.quadraticCurveTo.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rect.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rect.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rect.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rect.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rect.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rect.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.resetTransform.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.resetTransform.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.resetTransform.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.resetTransform.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.resetTransform.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.resetTransform.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.restore.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.restore.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.restore.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.restore.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.restore.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.restore.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rotate.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rotate.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rotate.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rotate.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rotate.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.rotate.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.roundRect.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.roundRect.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.roundRect.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.roundRect.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.roundRect.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.roundRect.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.save.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.save.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.save.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.save.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.save.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.save.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.scale.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.scale.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.scale.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.scale.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.scale.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.scale.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setLineDash.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setLineDash.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setLineDash.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setLineDash.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setLineDash.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setLineDash.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setTransform.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setTransform.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setTransform.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setTransform.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setTransform.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.setTransform.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke_1.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke_1.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke_1.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke_1.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke_1.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.stroke_1.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeRect.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeRect.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeRect.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeRect.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeRect.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeRect.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeText.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeText.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeText.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeText.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeText.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.strokeText.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.transform.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.transform.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.transform.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.transform.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.transform.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.transform.tutorial -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.translate.name -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.translate.description -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.translate.compatibility -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.translate.param -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.translate.returnValue -->

<!-- CUSTOMTYPEJSON.CanvasRenderingContext2D.methods.translate.tutorial -->

## 使用自定义字体@custonfont
在 canvas 中调用 [CanvasRenderingContext2D.filltext](#filltext)、[CanvasRenderingContext2D.stroketext](#stroketext) 绘制文字时，可通过 `font` 属性指定绘制文字所使用的字体样式，其中字体名称（fontfamily）可设置自定义字体。

当使用自定义字体时，需先通过 [uni.loadFontFace](load-font-face.md) 加载字体，字体加载成功之后在设置 `font` 属性指定字体名称。

完整示例代码参考[hello uni-app x](https://gitcode.net/dcloud/hello-uni-app-x/-/blob/alpha/pages/component/canvas/canvas-context.uvue)

