public RotatedText(string text, Graphics g, Random r) { m_text = text; SizeF textSize = g.MeasureString(text, ROTATE_TEXT_FONT); m_bound.Width = m_bound.Height = Convert.ToSingle(Math.Max(textSize.Width, textSize.Height)); m_angle = ANGLES[r.Next(ANGLES.Length)]; }
private void UpdateTextPosition(int step) { int currAngle = (int)Angle; int nextAngle = (currAngle + step) % 360; if (nextAngle < 0) { nextAngle += 360; } m_angle = (TextRatetedAngle)nextAngle; }