introduction to Graphics, initgraph method in C language
In Graphics programming we can draw various shapes (rectangle, circle eclipse etc), we can fill color in any object and create simple animation programs like jumping ball,rainbow, moving fan/cars etc. first of all we must include graphics.h header file in each graphics program. This file provides access to a simple graphics library functions to draw lines, rectangles, circle, eclipse, arcs, images, and strings on a graphical window.
เค्เคฐाเฅिเค्เคธ เคช्เคฐोเค्เคฐाเคฎिंเค เคฎें เคนเคฎ เคเค เคช्เคฐเคाเคฐ เคे เคฌेเคธिเค เคถेเคช เคैเคธे เคเคฏเคค, เคตृเคค, เคฆीเคฐ्เคเคตृเคค เคเคค्เคฏाเคฆि เคจिเคฐ्เคฎिเคค เคเคฐ เคธเคเคคे เคนै, เคเคจเคฎे เคฐंเค เคญเคฐ เคธเคเคคे เคนै, เคเคตं เคธाเคงाเคฐเคฃ เคเคจीเคฎेเคถเคจ เคช्เคฐोเค्เคฐाเคฎ เคैเคธे เคเคฎ्เคชिंเค เคฌाเคฒ, เคเคจ्เคฆ्เคฐเคงเคจुเคท , เคเคฒिเคค เคชंเคा เคฏा เคाเคฐ เคคैเคฏाเคฐ เคเคฐ เคธเคเคคे เคนै। เคธเคฐ्เคตเคช्เคฐเคฅเคฎ เคนเคฎे เคช्เคฐเคค्เคฏेเค เค्เคฐाเฅिเค्เคธ เคช्เคฐोเค्เคฐाเคฎ เคฎें graphics.h เคนैเคกเคฐ เคซाเคเคฒ เคธเคฎ्เคฎिเคฒिเคค เคเคฐเคจा เคนोเคคी เคนै เคฏे เคซाเคเคฒ เคธเคญी เคธाเคฎाเคจ्เคฏ เค्เคฐाเฅिเค्เคธ เคธे เคธเคฎ्เคฌंเคงिเคค เคซंเค्เคถเคจ เคฐเคเคคी เคนै เคिเคธเคธे เคนเคฎ เคฒाเคเคจ, เคเคฏเคค, เคตृเคค, เคฆीเคฐ्เคเคตृเคค, เคाเคช, เคिเคค्เคฐ เคเคตं เคธ्เค्เคฐींเค เคเคค्เคฏाเคฆि เคคैเคฏाเคฐ เคเคฐ เคธเคเคคे เคนै।
initgraph() method:-
initgraph() method of graphics.h library initializes the graphics drivers on the computer. it is used to changing the system into graphics mode. It also resets or initializes all graphics settings like color, palette, current position etc, to their default values.
graphics.h เคนैเคกเคฐ เคซाเคเคฒ เคी initgraph() เคฎेเคฅเคก เคंเคช्เคฏूเคเคฐ เคฎें เค्เคฐाเฅिเค्เคธ เคก्เคฐाเคเคตเคฐ เคो เคช्เคฐाเคฐंเคญ เคเคฐเคคी เคนै, เคฏเคน เคธिเคธ्เคเคฎ เคो เค्เคฐाเฅिเค เคฎोเคก เคฎें เคชเคฐिเคตเคฐ्เคคिเคค เคเคฐเคคी เคนै เคเคตं เคธเคญी เคธेเคिंเคเคธ เคो เคกिเฅॉเคฒ्เค เคตैเคฒ्เคฏू เคธे เคธेเค เคเคฐเคคी เคนै เคैเคธे เคเคฒเคฐ ,เคชेเคฒेเค, เคตเคฐ्เคคเคฎाเคจ เคธ्เคฅिเคคि เคเคค्เคฏाเคฆि।
Syntax:-
void initgraph(int *graphicsDriver, int *graphicsMode, char *driverDirectoryPath);
Here เคฏเคนाँ
graphicsDriver :- It is a pointer to an integer which tells the compiler that what graphics driver to use or to automatically detect the drive(DETECT).
เคฏเคน เคเค เคเคจ्เคिเคเคฐ เคชॉเคंเคเคฐ เคนै เคो เคเคฎ्เคชाเคเคฒเคฐ เคो เคฏเคน เคฌเคคाเคคा เคนै เคी เคौเคจ เคธे เค्เคฐाเฅिเค เคก्เคฐाเคเคตเคฐ เคा เคुเคจाเคต เคเคฐเคจा เคนै เคฏा เคก्เคฐाเคเคตเคฐ เคा เคुเคจाเคต เคธ्เคตเคค: เคเคฐเคจा เคนै।
graphicsMode :- It is a pointer to an integer that specifies the graphics mode to be used. If *graphicsDriver is set to DETECT, then initgraph sets *graphicMode to the highest resolution available for the detected driver.
เคฏเคน เคเค เคเคจ्เคिเคเคฐ เคชॉเคंเคเคฐ เคนै เคो เคเคฎ्เคชाเคเคฒเคฐ เคो เคฏเคน เคฌเคคाเคคा เคนै เคी เคौเคจ เคธे เค्เคฐाเฅिเค เคฎोเคก เคा เคुเคจाเคต เคเคฐเคจा เคนै เคฏเคฆि เค्เคฐाเฅिเค เคก्เคฐाเคเคตเคฐ เคा เคुเคจाเคต เคธ्เคตเคค: เคिเคฏा เคเคฏा เคนै เคคเคฌ เค्เคฐाเฅिเค เคฎोเคก เคเค्เคเคคเคฎ เคฐिเคธोเคฒूเคถเคจ เคชเคฐ เคธेเค เคिเคฏा เคाเคคा เคนै।
driverDirectoryPath :- It specifies the directory path where graphics driver files (BGI files) are located.
เคฏเคน เค्เคฐाเฅिเค เคก्เคฐाเคเคตเคฐ เคซाเคเคฒ (BGI เคซाเคเคฒ) เคे เคกाเคฏเคฐेเค्เคเคฐी เคชเคฅ เคो เคฆเคฐ्เคถाเคคा เคนै।
Comments
Post a Comment