Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>setaspectratio() set the aspect ratio</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setaspectratio()        Set the Aspect Ratio

 #include   <graphics.h>

 void far setaspectratio(xasp, yasp);
 int xasp;      X aspect
 int yasp;      Y aspect

        This function sets the aspect ratio. The value of yasp should
        be 10,000; xasp should be the same for square pixels as in the
        VGA and less than that value for tall pixels (as on other
        monitors).

    Returns:     Nothing.

   -------------------------------- Example ---------------------------------

    The following statements draws a circle with aspect ratio 2:1.

           #include <graphics.h>

           int gdriver = DETECT;
           int gmode;
           int x;

           main()
           {
               initgraph(&gdriver,&gmode,"");
               cleardevice();
               setaspectratio(20000, 10000);
               circle(300,150,100);
               getch();
               closegraph();
           }


See Also: getaspectratio()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson