setusercharsize
函数名
setusercharsize是一个函数名。
功能
矢量字体改变字符宽度和高度
程序例
#include <graphics.h>
#include
#include
#include
int main(void)
{
/* request autodetection */
int gdriver = DETECT, gmode, errorcode;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, '''');
/* read result of initialization */
errorcode = graphresult( );
if (errorcode != grOk) /* an error occurred */
{
getch( );
exit(1); /* terminate with an error code */
}
/* select a text style */
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 4);
/* move to the text starting position */
moveto(0, getmaxy() / 2);
/* output some normal text */
/* make the text 1/3 the normal width */
setusercharsize(1, 3, 1, 1);
/* make the text 3 times normal width */
setusercharsize(3, 1, 1, 1);
/* clean up */
getch( );
closegraph( );
return 0;
}
参考资料
最新修订时间:2024-03-27 23:14
目录
概述
功能
程序例
参考资料