void Trim()
{
Texture tex = mAtlas.texture;
if (tex != null && mSprite != null)
{
Rect full = NGUIMath.ConvertToPixels(mUVRect, texture.width, texture.height, true);
Rect trimmed = (mAtlas.coordinates == UIAtlas.Coordinates.TexCoords) ?
NGUIMath.ConvertToPixels(mSprite.outer, tex.width, tex.height, true) : mSprite.outer;
int xMin = Mathf.RoundToInt(trimmed.xMin - full.xMin);
int yMin = Mathf.RoundToInt(trimmed.yMin - full.yMin);
int xMax = Mathf.RoundToInt(trimmed.xMax - full.xMin);
int yMax = Mathf.RoundToInt(trimmed.yMax - full.yMin);
mFont.Trim(xMin, yMin, xMax, yMax);
}
}