Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Graphics canvas = e.Graphics;
- using (Font font1 = new Font("Arial", 40, FontStyle.Bold, GraphicsUnit.Point))
- {
- rectF1 = new RectangleF((float)(this.ClientSize.Width / 2.0), (float)(this.ClientSize.Height / 2.0), (float)(this.ClientSize.Width / 3.0), (float)(this.ClientSize.Height / 3.0));
- Bitmap bittikartta = new Bitmap(this.ClientSize.Width, this.ClientSize.Height);
- Graphics k = Graphics.FromImage(bittikartta);
- k.TranslateTransform((float)this.ClientSize.Width / 2, (float)this.ClientSize.Height / 2);
- k.RotateTransform(angle);
- if (++angle > 360) angle = 0;
- k.TranslateTransform(-(float)this.ClientSize.Width / 2, -(float)this.ClientSize.Height / 2);
- k.DrawString("TIEA202", font1, Brushes.White, rectF1);
- k.DrawRectangle(Pens.AntiqueWhite, Rectangle.Round(rectF1));
- canvas.DrawImage(bittikartta, 50, 50);
- //canvas.DrawString(text1, font1, Brushes.White, rectF1);
- //canvas.DrawRectangle(Pens.AntiqueWhite, Rectangle.Round(rectF1));
- }
Add Comment
Please, Sign In to add comment