# CanvasRenderer

Inheritance CanvasRenderer Renderer Module hilo/renderer/CanvasRenderer Requires hilo/core/Class, hilo/core/Hilo, hilo/renderer/Renderer Source CanvasRenderer.js
CanvasRenderer CanvasRenderer, all the visual object is drawing on the canvas element.The stage will create different renderer depend on the canvas and renderType properties, developer need not use this class directly.

### Properties

Show Inherited Properties

| Property | Defined
--- | --- | ---
| context:CanvasRenderingContext2D The context of the canvas element, readonly. | CanvasRenderer
| canvas:Object The canvas of renderer. | Renderer
| renderType:String The render type of renderer, readonly. | Renderer
| stage:Object The stage of renderer, readonly. | Renderer

### Methods

Show Inherited Methods

| Method | Defined
--- | --- | ---
| CanvasRenderer(properties:Object) Constructor | CanvasRenderer
| clear(x:Number, y:Number, width:Number, height:Number) Clear the given region of canvas. | Renderer
| draw(target:View) Draw the visual object. | Renderer
| endDraw(target:View) The handling method after draw the visual object. | Renderer
| hide() Hide the visual object. | Renderer
| remove(target:View) Remove the visual object from canvas. | Renderer
| resize(width:Number, height:Number) Resize the renderer's canvas. | Renderer
| startDraw(target:View) Prepare for draw visual object. | Renderer
| transform() Transfrom the visual object. | Renderer

### Property Detail

context:CanvasRenderingContext2D
The context of the canvas element, readonly.

### Constructor

CanvasRenderer(properties:Object)

parameters
properties:Object — The properties to create a renderer, contains all writeable props of this class.