public static void Create(Graphics g) { // Cub.BrushesExampleMethod(g); //Cub.Draw(g); Cub.PensExampleMethod(g); int x = 15, y = 20, h = 70, w = 200; Rectangle rect0 = new Rectangle(x, y, w, h); // или Rectangle rect1 = new Rectangle(new Point(x, y), new Size(w, h)); }
private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Cub.Create(g); }