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>setusercharsize() set width and height ratio for stroked fonts</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setusercharsize()       Set Width and Height Ratio for Stroked Fonts

 #include   <graphics.h>

 void far   setusercharsize(multx,divx,multy,divy);
 int        multx;
 int        divx;
 int        multy;
 int        divy;

    setusercharsize() allows you to modify the character height and width
    of stroked fonts.  The values in setusercharsize() will only be
    recognized if settextstyle() is called first with 'charsize' set to 0
    (USER_CHAR_SIZE is defined as 0 in <graphics.h>).

    Returns:    Nothing.

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

    The following statements print a scaled message inside an ellipse.

           #include <graphics.h>
           #include <conio.h>

           main()
           {
               int gdriver = DETECT;
               int gmode;
               char *msg = "Mother's Day";

               initgraph(&gdriver,&gmode,"");
               settextjustify(CENTER_TEXT,CENTER_TEXT);
               settextstyle(GOTHIC_FONT,HORIZ_DIR,USER_CHAR_SIZE);
               setusercharsize(200,textwidth(msg),100,textheight(msg));
               settextstyle(GOTHIC_FONT,HORIZ_DIR,USER_CHAR_SIZE);
               ellipse(320,160,0,360,125,75);
               outtextxy(320,150,msg);
               getch();
               closegraph();
           }


See Also: gettextsettings() settextjustify() settextstyle()

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