Exemplo n.º 1
0
        private void createComposedContents()
        {
            if (mImage != null)
            {
                mImage.removeFromParent(true);
                mImage = null;
            }
            if (mQuadBatch == null)
            {
                mQuadBatch = new AsQuadBatch();
                mQuadBatch.setTouchable(false);
                addChild(mQuadBatch);
            }
            else
            {
                mQuadBatch.reset();
            }
            AsBitmapFont bitmapFont = (AsBitmapFont)(getBitmapFonts()[mFontName]);

            if (bitmapFont == null)
            {
                throw new AsError("Bitmap font not registered: " + mFontName);
            }
            bitmapFont.fillQuadBatch(mQuadBatch, mHitArea.getWidth(), mHitArea.getHeight(), mText, mFontSize, mColor, mHAlign, mVAlign, mAutoScale, mKerning);
            mTextBounds = null;
        }