Exemplo n.º 1
0
 public short GetRotateAngle(eRotateText Rotate)
 {
     float RotateAngle = 0;
     switch (Rotate) {
         case eRotateText.Left:
             RotateAngle = 270;
             break;
         case eRotateText.Right:
             RotateAngle = 90;
             break;
     }
     return Convert.ToInt16(RotateAngle);
 }
Exemplo n.º 2
0
        private Rectangle RotateRect(System.Windows.Forms.PaintEventArgs e, Rectangle TabRect, eRotateText Rotate)
        {

            PointF cp = new PointF(TabRect.Left + (TabRect.Width / 2), TabRect.Top + (TabRect.Height / 2));
            e.Graphics.TranslateTransform(cp.X, cp.Y);
            e.Graphics.RotateTransform(GetRotateAngle(Rotate));
            return new Rectangle(-(TabRect.Height / 2), -(TabRect.Width / 2), TabRect.Height, TabRect.Width);

        }