GetRequiredWithAndHeight() публичный Метод

public GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight ) : void
lines IEnumerable
requiredWidth int
requiredHeight int
Результат void
Пример #1
0
        public void UpdatePreRenderDimensions()
        {
            if (this.mBitmapFont != null)
            {
                int requiredWidth;
                int requiredHeight;

                string[] lines = this.mRawText.Split('\n');

                mBitmapFont.GetRequiredWithAndHeight(lines, out requiredWidth, out requiredHeight);

                mPreRenderWidth  = requiredWidth;
                mPreRenderHeight = requiredHeight;
            }
        }
Пример #2
0
        public void UpdatePreRenderDimensions()
        {
            if (this.mBitmapFont != null)
            {
                int requiredWidth  = 0;
                int requiredHeight = 0;

                if (this.mRawText != null)
                {
                    string[] lines = this.mRawText.Replace("\r", "").Split('\n');

                    mBitmapFont.GetRequiredWithAndHeight(lines, out requiredWidth, out requiredHeight);
                }

                mPreRenderWidth  = (int)(requiredWidth * FontScale + .5f);
                mPreRenderHeight = (int)(requiredHeight * FontScale + .5f);
            }
        }