您当前的位置: 首页 > 

Jave.Lin

暂无认证

  • 5浏览

    0关注

    704博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

AS3 Scale9Grid ---- 9宫格类

Jave.Lin 发布时间:2012-09-05 18:49:30 ,浏览量:5

源码:

/*****************************************************
 *  
 *  The Initial Developer of the Original Code is Jave.Lin(afeng).
 *  
 *  Scale9Grid.as
 *  Create By Jave.Lin(afeng)
 *  2012-9-5 下午2:37:14
 *  
 *****************************************************/
package testScale9Grid
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	/**
	 *  9宫格类
	 * @author Jave.Lin(afeng)
	 **/
	public class Scale9Grid extends Sprite
	{
		private var _invalidate:Boolean=false;
		private const despoint:Point=new Point();
		
		private var _top_left_bmp:Bitmap;
		private var _top_bmp:Bitmap;
		private var _top_right_bmp:Bitmap;
		private var _right_bmp:Bitmap;
		private var _bottom_right_bmp:Bitmap;
		private var _bottom_bmp:Bitmap;
		private var _botton_left_bmp:Bitmap;
		private var _left_bmp:Bitmap;
		private var _center_bmp:Bitmap;
		
		private var _s9d:Rectangle;
		
		private var _bmd:BitmapData;
		public function get bmd():BitmapData
		{
			return _bmd;
		}
		
		private var _w:Number;
		private var _minW:Number;
		public override function get width():Number
		{
			return _w;
		}
		public override function set width(value:Number):void
		{
			if(_w!=value)
			{
				_w=value;
				
				if(_w            
关注
打赏
1664331872
查看更多评论
0.0838s