AIsOfCatan.GUIBufferTextBlock.UpdateRect C# (CSharp) Method

UpdateRect() protected method

protected UpdateRect ( ) : void
return void
        protected override void UpdateRect()
        {
            Vector2 textVector;
            if (Text != null)
            {
                textVector = TXAGame.ARIAL.MeasureString(Text) * TXAGame.SCALE;
            }
            else
            {
                textVector = TXAGame.ARIAL.MeasureString("") * TXAGame.SCALE;
            }

            Area = new Rectangle(
                (int) (Math.Round(Position.X)), (int) (Math.Round(Position.Y)),
                (int) (Math.Round(textVector.X + (Buffer.X*2))), (int) (Math.Round(textVector.Y + (Buffer.Y*2))));
        }