0

Bassically I want my letter to rotate clockwise but not all over the form, I want it to rotate in one place.

 private void Form1_Paint(object sender, PaintEventArgs e)
        {
            RotateImage(e.Graphics);
.
        }
        string a = "A";
        float d= 15f;
        Font stringFont = new Font("Arial", 16);

        private SizeF stringSize(Graphics paper1) 
        {
            SizeF stringSizee = new SizeF();
            stringSizee = paper1.MeasureString(a, stringFont);
            return stringSizee;

        }

        public void RotateImage(Graphics paper)
        {

            SizeF far = stringSize(paper);
            paper.TranslateTransform((float)far.Width/2,(float)far.Height/2);
            paper.RotateTransform(d);
            d+=2f;
            paper.TranslateTransform(- (float)far.Width / 2, -(float)far.Height / 2);
            paper.DrawString(a, stringFont, Brushes.Black,new PointF(100,100));

        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            this.Invalidate();
        }
2
Contributors
1
Reply
13
Views
4 Years
Discussion Span
Last Post by ddanbe
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.