mirror of
https://github.com/hiloteam/Hilo.git
synced 2026-01-18 16:04:19 +00:00
6 lines
696 B
JavaScript
6 lines
696 B
JavaScript
/**
|
|
* hilojs 2.0.3 for amd
|
|
* Copyright 2016 alibaba.com
|
|
* Licensed under the MIT License
|
|
*/
|
|
define("hilo/view/Bitmap",["hilo/core/Hilo","hilo/core/Class","hilo/view/View","hilo/view/Drawable"],function(i,t,h,e){var s=t.create({Extends:h,constructor:function(t){if(t=t||{},this.id=this.id||t.id||i.getUid("Bitmap"),s.superclass.constructor.call(this,t),this.drawable=new e(t),!this.width||!this.height){var h=this.drawable.rect;h&&(this.width=h[2],this.height=h[3])}},setImage:function(i,t,h){return this.drawable.init({image:i,rect:t,crossOrigin:h}),t?(this.width=t[2],this.height=t[3]):this.width||this.height||(t=this.drawable.rect,t&&(this.width=t[2],this.height=t[3])),this}});return s}); |