الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

للفنانين للرسم بلغة c++ سؤال جديد ممكن!!!

مغلق
بدأه مبرمج المستقبل في 29 نوفمبر 2002 · 4 رد · 481 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

(f)(f)(f)السلام عليكم.

أولا اشكركم على تعاونكم معي لتشغيل ال (graphics) في لغة السي بلس بلس اللي استخدمها.

لكن أطلب منكم المرة هذي أفكار الرسم المستخدمة اذا جربتوا الرسم .

ياليت تفيدونا بأفكاركم و رسوماتكم.

و شكرا جزيلا لكم.(f)(f)(f)

#2

في الهلب في تربو سي++ هناك العديد من الامثلة.. لكل دالة مثال.. جربها وتعرف على الدوال واحدة واحدة..

واذا واجهت مشاكل لا تتردد في طرحها.

#3

مشكور أخوي اسماعيل . بس أنا أبغى أفكار جديدة إذا كان عندكم.

و شكرا;););)

#4

السلام عليكم و رحمة الله و بركاته....

انا عندي برنامج عن الرسم فيه تقريبا عدد لا بأس به من الدوال التي تخص الرسم في البورلاند سي بلس بلس

ان شاء الله تستفيد منه

]

//CS454

#include <graphics.h>  //You should include this header file for the graphics functions.

#include <conio.h>

#include <dos.h>

#include <iostream.h>

void main ()

{

	//start graphic mode.

	int gdriver=DETECT, gmode;

	initgraph(&gdriver,&gmode,"C:BorlandcBGI");



	//This func. will clear the screen in the graphics mode.

	cleardevice();



	//To display a text in the graphics mode, use outtextxy or outtext func.

	//In graphics mode the resolution is 640*480

	setcolor(4);

	outtextxy(10,40,"* Welcome to the first graphics program in c++ *");



	//you still can use the cout and gotoxy, but the coordinates will

	//be as in the text mode (25*80).

	gotoxy(5,10);

	cout <<"The resolution in Graphics mode is: "<<getmaxx()+1

      <<" * "<<getmaxy()+1;





	//You will see some dots and circls in different colors.

	for (int i=15;i<30;++i)

	{

  putpixel(i,90,i);

  setcolor(i);

  circle(10*i,90,25);

  delay(500);

	}

	setcolor(7);

	outtextxy(100,400,"press any key to continue...");

	getch();



	//To display a filled circle, use setfillstyle then floodfill func.

	cleardevice();

	setcolor(129);

	circle(300,200,100);



	setcolor(RED);

	circle(250,200,25);

	circle(350,200,25);

	setfillstyle(SOLID_FILL,4);

	floodfill(250,200,RED);

	setfillstyle(BKSLASH_FILL,7);

	floodfill(350,200,RED);



	setcolor(7);

	settextstyle(4,HORIZ_DIR,4);

	outtextxy(250,230,"Booooo");



	setcolor(7);

	settextstyle(0,HORIZ_DIR,0);

	outtextxy(150,400,"Press any key to end the program...");

	getch();



	//Drawing different shapes: Ellipse, Rectangle and line.

	cleardevice();

	setbkcolor(7);



	setcolor(4);

	setfillstyle(LINE_FILL,4);

	fillellipse(80,140,70,20);



	setlinestyle(DASHED_LINE,1,3);

	line(250,250,350,250);



   setlinestyle(USERBIT_LINE,0x0303,1);

	line(250,260,350,260);



	setcolor(5);

	rectangle(200,200,500,400);



   int poly[10]={20,20,50,20,50,50,20,50,20,20};

   setlinestyle(SOLID_LINE,1,1);

   setfillstyle(SOLID_FILL,5);

   fillpoly(5,poly);

	getch();

	//close graphic mode.

	closegraph();

}[/
#5

مشكورة أختي برمجة و ما تقصري...(f)(f)(f)

هذا الموضوع مغلق.

مواضيع مشابهة