Questions tagged [bgi]

Borland graphics interface (graphics.h) is a legacy library for 2D graphics similar to nowadays GDI.

Borland graphics interface (graphics.h)

  • is an old legacy library for 2D graphics similar to nowadays
  • was widely used with Borland IDE's like Turbo Pascal or Turbo C++
  • is still used in some schools
392 questions
2
votes
1 answer

How do I graph data in c++?

I am trying to make a graph using graphics.h in c++. I was following a tutorial on youtube. It seems that either due to the age of the video (perhaps the syntax has changed slightly?) or a problem on my end; I cannot even get a separate window for…
Erabior
  • 31
  • 3
2
votes
1 answer

How do I get my cursor's position with respect to the window using graphics.h?

I've just recently learned how to get my mouse position but if I move my window it is having a problem. Example, I want to draw a dot in the position of the mouse coordinate (x = 100, y = 100) so the system will draw at that coordinate in the window…
Vincent
  • 31
  • 5
2
votes
1 answer

Generate a "pieslice" in C without using the pieslice() of graphics.h

In the BGI library's "graphics.h" header there is a function pieslice in that header file,its syntax is: #include void pieslice(int x, int y, int stangle, int endangle, int radius); [x,y are the center of the circle,stangle and…
user10626935
2
votes
1 answer

why not the drawing window open in c++ grahpics?

I have added winbgim.h and graphics.h to the include folder in the codeblock location. libbgi.a is also added to the lib folder. Below code is to draw a cicle: #include #include int main() { initwindow(300,300,"test"); …
miltonbhowmick
  • 324
  • 1
  • 5
  • 17
2
votes
1 answer

graphics.h for microsoft visual studio community 2017

I have been including the graphics.h in the header folder of vs project, but for some reason, it still says "No such file directory". I watched one of the videos and I saw that I need to get graphics.lib and I have no idea where the .lib file is…
Alex Zhuravel
  • 47
  • 1
  • 9
2
votes
0 answers

How to pass variables from console

I'm writing a C++ graphic program. I need to translate, scale and rotate this rhombus shape (as well as other shapes). I want to write a function to do that but I've not figured out how to pass x1, y1, x2, y2 from the mouse inputs(or keyboard…
2
votes
1 answer

Running my first graphics program in codeblocks

I am trying to run "line program" in graphics using C++ in Code Blocks. I had already done setting up the environment in code blocks for graphics. Still I am getting the problem in this program. The program shows no error , but when I run it , it…
FILZA Tariq
  • 31
  • 1
  • 4
2
votes
1 answer

matrix sort of graphics in C

I am making a program with graphics.h in C.I am trying to implement the matrix screen saver but I am stuck here in the code.The alphabets fall just once.I want them to keep on falling (removing the text before).Please guide me how to clear the old…
user379888
2
votes
2 answers

B-Splines in C++

I'm trying to write a program to generate a curve in C++ to plot a B-Spline curve. This is what my code looks like. void drawBSplineCurve(vector poly) { int n, d; cout << "Enter degree of curve: "; cin >> d; n = poly.size(); …
naman1901
  • 305
  • 4
  • 16
2
votes
3 answers

Using Standard Cartesian Circle formula to draw circle in graphics mode (C++)

I wanted to draw a circle using graphics.h in C++, but not directly using the circle() function. The circle I want to draw uses smaller circles as it's points i.e. The smaller circles would constitute the circumference of the larger circle. So I…
Zac
  • 998
  • 6
  • 19
2
votes
4 answers

Set window size in graphics.h on Ubuntu

initwindow() doesn't seem to work, nor does initgraph(). How do I set the width and height of the window?
Aanchal Adhikari
  • 303
  • 4
  • 12
2
votes
2 answers

Windows error while writing graphic codes in Code Blocks. How to fix it?

I am having trouble using graphics.h in code blocks. I have installed winbgi. Edited 302nd line. Linked lib file and all that stuff is done. So, I don't have any error regarding graphics header file. But whenever I run/build any code involving…
2
votes
2 answers

How do I solve the following error in Linux Graphics C program?

I am trying to compile the following code,but it gives me a error message as listed below. I am a beginner in linux c graphics and cannot figure it out. Can anyone suggest a solution? code: #include #include void main() { …
2
votes
2 answers

Undefined references with graphics.h in Dev C++?

I am trying to use graphics.h header file and to write a simple program to test whether it works. This is the program which I wrote #include int main( ) { initwindow(400, 300, "First Sample"); circle(100, 50, 40); while…
user5074435
2
votes
1 answer

turbo c graphics no error but doesn't run

The following code doesn't have any error but it won't run. There's just a flash on the screen when I run it. It doesn't provide any output. what do I have to do? #include #include void main() { int gd = DETECT, gm; …
1 2
3
26 27