outtext只能水平输出,我想要文字能够垂直输出,类似下面这样,可以像outtextxy一样指定输出位置,求大佬解决
#include <stdio.h>
int main()
{
printf("H\n");
printf("e\n");
printf("l\n");
printf("l\n");
printf("o\n");
return 0;
}
outtext只能水平输出,我想要文字能够垂直输出,类似下面这样,可以像outtextxy一样指定输出位置,求大佬解决
#include <stdio.h>
int main()
{
printf("H\n");
printf("e\n");
printf("l\n");
printf("l\n");
printf("o\n");
return 0;
}
使用 settextstyle 可以设置字符串的输出方向以及每个字符的输出方向,详见:https://docs.easyx.cn/zh-cn/settextstyle
例如,垂直向下输出的 HELLO 可以这样实现:
#include <graphics.h>
#include <conio.h>
int main()
{
initgraph(640, 480); // 初始化图形窗口
settextstyle(32, 0, _T("Arial"), -900, 0, 400, false, false, false);
outtextxy(100, 100, _T("HELLO"));
_getch();
closegraph();
return 0;
}