# Drawable

Module hilo/view/Drawable Requires hilo/core/Class, hilo/util/util Source Drawable.js
Drawable is a wrapper of drawable images.

### Properties

| Property | Defined
--- | --- | ---
| image:Object Image to be drawed, can used by CanvasRenderingContext2D.drawImage，like HTMLImageElement、HTMLCanvasElement、HTMLVideoElement。 | Drawable
| rect:array The retangle area that image will be drawed. | Drawable

### Methods

| Method | Defined
--- | --- | ---
| Drawable(properties:Object) Constructor | Drawable
| init(properties:Object) Initialize drawable elements. | Drawable
| isDrawable(elem:Object):Boolean static Check whether the given 'elem' and be wrapped into Drawable object. | Drawable

### Property Detail

image:Object
Image to be drawed, can used by CanvasRenderingContext2D.drawImage，like HTMLImageElement、HTMLCanvasElement、HTMLVideoElement。
rect:array
The retangle area that image will be drawed.

### Constructor

Drawable(properties:Object)

parameters
properties:Object — create Objects properties, contains all writable properties.

### Method Detail

init(properties:Object)
Initialize drawable elements.

parameters
properties:Object — Properties need to be initialized.

[Static] isDrawable(elem:Object):Boolean
Check whether the given 'elem' and be wrapped into Drawable object.

parameters
elem:Object — Element to be tested.

return
  Boolean — Return true if element can be wrapped into Drawable element, otherwises return false.