24 lines
528 B
Haxe
Executable File
24 lines
528 B
Haxe
Executable File
package haxework.gui;
|
|
|
|
import haxework.gui.utils.DrawUtil.FillType;
|
|
import haxework.gui.skin.BitmapSkin;
|
|
import haxework.gui.skin.ButtonBitmapSkin;
|
|
import flash.display.BitmapData;
|
|
|
|
class ImageView extends SpriteView {
|
|
|
|
public var image(default, set):BitmapData;
|
|
|
|
public function new() {
|
|
super();
|
|
}
|
|
|
|
private function set_image(value:BitmapData):BitmapData {
|
|
if (image != value) {
|
|
image = value;
|
|
skin = untyped new BitmapSkin(image, FillType.CONTAIN);
|
|
invalidate();
|
|
}
|
|
return image;
|
|
}
|
|
} |