سلام دوستان
کسی میتونه کدهای این شکل رو با استفاده از dev-cpp بنویشه؟
[ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]
Printable View
سلام دوستان
کسی میتونه کدهای این شکل رو با استفاده از dev-cpp بنویشه؟
[ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]
این دک سی شارپه. اگه خواستی می تونی به C++ تغییر بدی.
[PHP] struct Transformation
{
public float x;
public float y;
public float s;
}
private void drawLogo(Graphics Gfx, float x, float y, float s)
{
Transformation[] Transformations =
{
new Transformation {x = -57, y = -18, s = 227},
new Transformation {x = -31, y = -3, s = 209},
new Transformation {x = -22, y = 6, s = 229},
new Transformation {x = 27, y = -1, s = 173},
new Transformation {x = 22, y = 6, s = 229},
new Transformation {x = -27, y = -1, s = 173},
new Transformation {x = 57, y = -18, s = 227},
new Transformation {x = 31, y = -3, s = 209},
};
for (int i = 0; i < Transformations.Length; i++)
{
Transformations[i].x *= s;
Transformations[i].y *= s;
Transformations[i].s *= s;
Transformations[i].x += x - Transformations[i].s / 2;
Transformations[i].y += y - Transformations[i].s / 2;
}
Pen Pen = new Pen(Color.Black, s);
Gfx.DrawArc(Pen, Transformations[0].x, Transformations[0].y, Transformations[0].s, Transformations[0].s, -35, 130);
Gfx.DrawArc(Pen, Transformations[1].x, Transformations[1].y, Transformations[1].s, Transformations[1].s, -50, 160);
Gfx.DrawArc(Pen, Transformations[2].x, Transformations[2].y, Transformations[2].s, Transformations[2].s, -52, 89);
Gfx.DrawArc(Pen, Transformations[3].x, Transformations[3].y, Transformations[3].s, Transformations[3].s, -75, 135);
Gfx.DrawArc(Pen, Transformations[4].x, Transformations[4].y, Transformations[4].s, Transformations[4].s, 143, 89);
Gfx.DrawArc(Pen, Transformations[5].x, Transformations[5].y, Transformations[5].s, Transformations[5].s, 120, 135);
Gfx.DrawArc(Pen, Transformations[6].x, Transformations[6].y, Transformations[6].s, Transformations[6].s, 85, 130);
Gfx.DrawArc(Pen, Transformations[7].x, Transformations[7].y, Transformations[7].s, Transformations[7].s, 70, 160);
}
private void button1_Click(object sender, EventArgs e)
{
Graphics Graphics = pictureBox1.CreateGraphics();
drawLogo(Graphics, 100, 100, 0.6f);
}[/PHP]