using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace picture
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen myPen = new Pen(Color.Black /*,1/e.Graphics .DpiX*/);
g.DrawRectangle(myPen ,10,10,100,50);
g.TranslateTransform(60,60);
g.DrawRectangle(myPen ,10,10,100,50);
g.RotateTransform(30.0f);
g.DrawRectangle(myPen ,10,10,100,50);
g.ScaleTransform(0.5f,0.5f);
g.DrawRectangle(myPen ,10,10,100,50);
g.DrawEllipse(myPen ,-0.5f,-0.5f,1,1);
g.TranslateTransform(50,50);
//g.ScaleTransform(10.0f, 10.0f);
g.DrawEllipse(myPen ,-0.5f,-0.5f,200,200);
//g.ScaleTransform(10.0f,10.0f);
g.DrawEllipse(myPen ,1.5f,1.5f,100,100);
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace picture
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen myPen = new Pen(Color.Black /*,1/e.Graphics .DpiX*/);
g.DrawRectangle(myPen ,10,10,100,50);
g.TranslateTransform(60,60);
g.DrawRectangle(myPen ,10,10,100,50);
g.RotateTransform(30.0f);
g.DrawRectangle(myPen ,10,10,100,50);
g.ScaleTransform(0.5f,0.5f);
g.DrawRectangle(myPen ,10,10,100,50);
g.DrawEllipse(myPen ,-0.5f,-0.5f,1,1);
g.TranslateTransform(50,50);
//g.ScaleTransform(10.0f, 10.0f);
g.DrawEllipse(myPen ,-0.5f,-0.5f,200,200);
//g.ScaleTransform(10.0f,10.0f);
g.DrawEllipse(myPen ,1.5f,1.5f,100,100);
}
}
}