setfillstyle function in c using graphics.h

  • برمجة سي c

setfillstyle function in c using graphics.h

setfillstyle function sets the current fill pattern and fill color.

Declaration: void setfillstyle( int pattern, int color);

Different fill styles:

enum fill_styles
{
   EMPTY_FILL,
   SOLID_FILL,
   LINE_FILL,
   LTSLASH_FILL,
   SLASH_FILL,
   BKSLASH_FILL,
   LTBKSLASH_FILL,
   HATCH_FILL,
   XHATCH_FILL,
   INTERLEAVE_FILL,
   WIDE_DOT_FILL,
   CLOSE_DOT_FILL,
   USER_FILL
};

الأجوبة

#include<graphics.h>
#include<conio.h>

main()
{
   int gd = DETECT, gm;

   initgraph(&gd, &gm, "C:\\TC\\BGI");

   setfillstyle(XHATCH_FILL, RED);
   circle(100, 100, 50);
   floodfill(100, 100, WHITE);

   getch();
   closegraph();
   return 0;
}
هل كان المحتوى مفيد؟

القوائم الدراسية التي ينتمي لها السؤال

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...