C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » General »

graphics in C


Posted Date: 04 Oct 2008      Posted By: Vidhi Suri      Member Level: Bronze     Points: 1   Responses: 1



How can I fill color into a rectangle in a C language so that the rectange be of blue color lets say. by filling it by the function setfillstyle(SOLID_FILL,1);
I am not gettin it right.
The program was.....
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT, gm;
initgraph(&gd,&gm,"c:\\tc\\bin");
setcolor(1); //sets a blue color to the outline
setfillstyle(1,14); //This does'nt work
rectangle(200,100,300,350);
getch();
}





Responses

Author: Preet    07 Oct 2008Member Level: GoldRating: 3 out of 53 out of 53 out of 5     Points: 3

Use the floodfill function to fill an area, pass two arguments (x,y) which would be any point in the rectangle boundries. And this function will fill the area untill get some boundries.


Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Indian Current Affairs --- website Names
Previous : Related to project
Return to Discussion Forum
Post New Message
Category: General

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use