C# Drawing

Posted: July 4, 2014 in C#
Tags:

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 WindowsFormsApplication19
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

this.Width = 800;
this.Height = 400;

}

private void button1_Click(object sender, EventArgs e)
{
System.Drawing.Graphics Cizim = this.CreateGraphics();
System.Drawing.Pen Kalem = new System.Drawing.Pen(Color.Blue, 3);
Cizim.DrawRectangle(Kalem, 40, 20, 600, 250);

System.Drawing.Graphics Daire = this.CreateGraphics();
Daire.DrawEllipse(Kalem, 150, 70, 80, 80);
Daire.DrawEllipse(Kalem, 450, 70, 80, 80);
Daire.DrawEllipse(Kalem, 175, 92, 30, 30);
Daire.DrawEllipse(Kalem, 475, 92, 30,30);
Cizim.DrawArc(Kalem, new Rectangle(60, 40, 160, 50), 0,-90 );

Graphics Cizgi = this.CreateGraphics();
Cizgi.DrawLine(Kalem, 340, 80, 340, 170);
Cizgi.DrawLine(Kalem, 360, 80, 360, 170);
Cizgi.DrawLine(Kalem, 340, 80, 360, 80);
Cizgi.DrawLine(Kalem, 340, 170, 360, 170);

Graphics yaz = this.CreateGraphics();
Font yaz_tip = new Font(“Arial”, 30, FontStyle.Underline);
SolidBrush Renk = new SolidBrush(Color.Red);
PointF Koordinat = new PointF(220, 190);
yaz.DrawString(“Gülen Adam”, yaz_tip, Renk, Koordinat);

}
}
}
gülen adama

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s