コード例 #1
0
ファイル: NinePatchDrawable.cs プロジェクト: RastaCow/Nez
		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
ファイル: NineSliceSprite.cs プロジェクト: RastaCow/Nez
 public NineSliceSprite( NinePatchSubtexture subtexture )
     : base(subtexture)
 {
     this.subtexture = subtexture;
 }