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

Popular posts from this blog

C Language Topics in Hindi and English

Top High-Paying Tech Skills to Learn in 2025

C language IMP Questions for BSc/BA/BCom/BCA/BE/BTech/MSc/MCA (CS/IT) I year students