示例#1
0
		public NinePatchDrawable( NinePatchSubtexture subtexture )
		{
			_subtexture = subtexture;
			minWidth = _subtexture.ninePatchRects[MIDDLE_LEFT].Width + _subtexture.ninePatchRects[MIDDLE_CENTER].Width + _subtexture.ninePatchRects[MIDDLE_RIGHT].Width;
			minHeight = _subtexture.ninePatchRects[TOP_CENTER].Height + _subtexture.ninePatchRects[MIDDLE_CENTER].Height + _subtexture.ninePatchRects[BOTTOM_CENTER].Height;

			// by default, we will pad the content by the nine patch margins
			leftWidth = _subtexture.left;
			rightWidth = _subtexture.right;
			topHeight = _subtexture.top;
			bottomHeight = _subtexture.bottom;
		}
示例#2
0
 public NineSliceSprite( NinePatchSubtexture subtexture )
     : base(subtexture)
 {
     this.subtexture = subtexture;
 }