/// Dimensions in ninepatch. May also represent position in texture atlas.
/// </summary>
publicRectangletextureRegion;
readonlyTexture2Dtexture;
readonlyintleft,right,bottom,top;
Rectangle[]sourcePatches;
/// <summary>
/// A nine patch object.
/// </summary>
/// <param name="texture">Texture used for the nine patch. Dimensions must be greater than their sum border counter parts. If used as part of texture atlas, the texture should be the texture of the entire atlas.</param>
/// <param name="left">Left side.</param>
/// <param name="right">Right side.</param>
/// <param name="bottom">Bottom side.</param>
/// <param name="top">Top side.</param>
/// <param name="textureBounds">The dimensions and potentially the coordinates of the rectangle on an atlas. If left to default of null, will only be set to texture bounds.</param>
if(left+right>=textureRegion.Width)thrownewArgumentOutOfRangeException("left and right values cannot be greater than or equal to the width of region. Left value is "+left+" and right value is "+right+". Bounds of texture are: "+textureRegion);
if(bottom+top>=textureRegion.Height)thrownewArgumentOutOfRangeException("Bottom and top values cannot be greater than or equal to the width of region. Bottom value is "+bottom+" and top value is "+top+".");