answersLogoWhite

0

A function in Borland's graphics library in TurboC; switches to graphics mode.

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What is initgraph in computer graphics?

The initgraph() is a method that you always use when you want to write graphic programming in C++. It is used to initial graphi window before something can be drawn on the window.


How do you intialize graphic mode in c?

Platform-dependent. For Turbo C, enter initgraph and press Ctrl+F1.


Why you are writing DETECT in computer graphics program?

because initgraph() automatically detect current available graphmode and load it on to the graphdriver.


Why in c language initgraph doesn't work?

Initgraph initializes the graphics system by loading a graphics driver from disk (or validating a registered driver) then putting the system into graphics mode.Initgraph also resets all graphics settings (color, palette, current position, viewport, etc.) to their defaults, then resets graphresult to 0.


How to use graphics in c plus plus?

At the beginning in the header file: #include <graphics.h>


How do you write a program that draws a rectangle using turbo pascal?

To draw a rectangle in Turbo Pascal, you can use the Rectangle procedure from the Graph unit. First, initialize the graphics mode with InitGraph, then specify the coordinates for the top-left and bottom-right corners of the rectangle. Use the Rectangle function with these coordinates, and finally, use CloseGraph to exit the graphics mode. Here’s a simple example: uses Graph; var gd, gm: Integer; begin gd := Detect; InitGraph(gd, gm, ''); Rectangle(100, 100, 300, 200); // Draws a rectangle ReadLn; // Wait for user input CloseGraph; end.


What is bgi?

BGI stands for Borland Graphics Interface. These are the files that contains the information about the graphic functions to be used. These are responsible for performing graphic operations under dos. In Borland turbo c++ these files are contained in directory. -> c:\tc\bgi By default these are loaded in the current directory while compiling and executing the program under c/c++ but sometimes we need to specify their path in "initgraph() function. like: initgrapy(&gdriver,&gmode,"c:\\tc\\bgi"); otherwise it will display you error about bgi.


How do you draw rectangular by using devc plus plus?

To draw a rectangle in Dev-C++, you can use the graphics.h library, which provides functions for drawing shapes. First, include the graphics.h header and initialize the graphics mode using initgraph(). Then, use the rectangle(x1, y1, x2, y2) function, where (x1, y1) are the coordinates of one corner and (x2, y2) are the coordinates of the opposite corner. Finally, use getch() to wait for a key press before closing the graphics window with closegraph().


How do you draw a circle in c program?

Here, maybe a few other shapes as well#include#includevoid main(){int gd=DETECT, gm;int poly[12]={350,450, 350,410, 430,400, 350,350, 300,430, 350,450 };initgraph(&gd, &gm, "");circle(100,100,50);outtextxy(75,170, "Circle");rectangle(200,50,350,150);outtextxy(240, 170, "Rectangle");ellipse(500, 100,0,360, 100,50);outtextxy(480, 170, "Ellipse");line(100,250,540,250);outtextxy(300,260,"Line");sector(150, 400, 30, 300, 100,50);outtextxy(120, 460, "Sector");drawpoly(6, poly);outtextxy(340, 460, "Polygon");getch();closegraph();}


Write a C Program to draw concentric circles using mid-point algorithm?

#include#include#includevoid main(){int gd=DETECT,gm=4,i;initgraph(&gd,&gm,"c:\\tc\\bgi");setcolor(3);for(i=0;i


Write a C program to draw a pie chart?

int main() { int gd = DETECT, gm; int midx, midy; initgraph(&gd, &gm, "C:\TC\BGI"); setcolor(MAGENTA); rectangle(0,40,639,450); settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2); setcolor(WHITE); outtextxy(275,10,"Pie Chart"); midx = getmaxx()/2; midy = getmaxy()/2; setfillstyle(LINE_FILL,BLUE); pieslice(midx, midy, 0, 75, 100); outtextxy(midx+100, midy - 75, "20.83%"); setfillstyle(XHATCH_FILL,RED); pieslice(midx, midy, 75, 225, 100); outtextxy(midx-175, midy - 75, "41.67%"); setfillstyle(WIDE_DOT_FILL,GREEN); pieslice(midx, midy, 225, 360, 100); outtextxy(midx+75, midy + 75, "37.50%"); getch(); return 0; }


Design a fish and give movement with suitable animation function in C programming?

: #include<graphics.h> #include<stdio.h> #include<conio.h> #include<alloc.h> #include<math.h> #include<dos.h> const pi=3.14; void main() {int gd=DETECT, gm,i,x,y; int size; void *buf; initgraph(&gd,&gm,"c:\\tc\\bgi"); ellipse(240,210,0,160,90,45); ellipse(240,190,180,360,90,45); circle(170,195,3); ellipse(100,230,10,400,100,80); ellipse(232,207,0,365,100,150); arc(265,170,0,160,15); arc(225,233,180,350,20); arc(265,233,180,380,10); size=imagesize(150,150,350,350); buf=(char *)malloc(size); getimage(150,150,350,350,buf); for(i=0;i<=360;i+=2) {delay(10); cleardevice(); x=150*cos(i*pi/180); y=150*sin(i*pi/180); putimage(200+x,100+y,buf,0); } getch(); restorecrtmode();}

Trending Questions
Write a COBOL program to add 2 matrices? C program to find whether the given point lies inside or outside or in circle? Why not to be disrespectful in class? Are craisins GMO? What are three factors must be considered while designing a water retaining structure? How do I convert a string to an integer in python? When transistor acts as an amplifier then does its output voltage increase or decrease? You are a 4 digit number your thousands digit is twice your ones digit your hundreds digit is four times your thousands digit and your tens digit is the sum of your ones and thousands digit what numbe? A differential pressure transmitter is to be calibrated to read level of a closed vessel The dimensions of the closed vessel are as given below What would be the calibration range of the transmitter? What elements are most important to the success of the Manhattan Project? Who built the first hydrogen bomb? Which answer gives both a positive impact and a negative impact that are associated with the effects of nitrogen- and phosphorus-enhanced fertilizers? Can you get a new bathtub through door? What is he relationship between voltage current and resistance called? What is code of assembly language for generating the delay of 1 second? What temperature does a standard CPU melt? What is the starting salary of a chemical engineer in Bangladesh? What is the importance of maintaining separation between High voltage and Low voltage earthing systems? Write buzzwords in java? Advantages and disadvantages of manual data processing?