- getmaxy() function is used to fetch the maximum Y coordinate for the current graphics mode or driver.You can learn about graphics mode and graphic driver in chapter Let’s Start.
- Selection of the graphics mode and graphics driver is depending upon the adapter or monitor presents in the user’s computer.
- For better understanding go through the program:
int gd=DETECT, gm, y;
sprintf(a,”maximum Y coordinate for current graphics driver and graphics mode is %d”,y);
The above program is used to find the maximum Y coordinate for the chosen graphics mode and graphics driver. In the program getmaxy() function is used to fetch the maximum Y coordinate and then store it into the integer type variable y.The above program will give the following output after execution: