FairyGUI.NTexture.NTexture C# (CSharp) Method

NTexture() public method

public NTexture ( NTexture root, Rect region ) : System.Collections.Generic
root NTexture
region UnityEngine.Rect
return System.Collections.Generic
        public NTexture(NTexture root, Rect region)
        {
            this.root = root;
            nativeTexture = root.nativeTexture;

            if (root._region != null)
            {
                region.x += ((Rect)root._region).x;
                region.y += ((Rect)root._region).y;
            }
            _region = region;

            uvRect = new Rect(region.x * root.uvRect.width / nativeTexture.width, 1 - region.yMax * root.uvRect.height / nativeTexture.height,
                region.width * root.uvRect.width / nativeTexture.width, region.height * root.uvRect.height / nativeTexture.height);
        }

Same methods

NTexture::NTexture ( Texture texture ) : System.Collections.Generic
NTexture::NTexture ( Texture texture, Rect region ) : System.Collections.Generic
NTexture::NTexture ( Texture texture, float xScale, float yScale ) : System.Collections.Generic