private void AlignText()
{
Vector2 Measurement = m_Font.MeasureString(Caption);
Vector2 LocalCopy = Position;
switch (m_Alignment)
{
case TextAlignment.Left_Top:
//Is there a need to modify position at all here??
break;
case TextAlignment.Left_Center:
LocalCopy.Y += (m_Size.Y / 2) - (Measurement.Y / 2);
Position = LocalCopy;
break;
case TextAlignment.Center_Top:
LocalCopy.X += (m_Size.X / 2) - (Measurement.X / 2);
Position = LocalCopy;
break;
case TextAlignment.Center_Center:
LocalCopy.X += (m_Size.X / 2) - (Measurement.X / 2);
LocalCopy.Y += (m_Size.Y / 2) - (Measurement.Y / 2);
Position = LocalCopy;
break;
case TextAlignment.Right_Top:
LocalCopy.X += m_Size.X - Measurement.X;
Position = LocalCopy;
break;
case TextAlignment.Right_Center:
LocalCopy.X += m_Size.X - Measurement.X;
LocalCopy.Y += (m_Size.Y / 2) - (Measurement.Y / 2);
Position = LocalCopy;
break;
}
}