vs2019无法识别标识符XOR_PUT?

0

vs2019无法识别标识符XOR_PUT?

#include<time.h>
#include<stdlib.h>
#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<math.h>

#define PI 3.1415926
#define step 10
#define R 10

main()
{
	int gdriver = 9, gmode = 2;
	static int startx = 5;
	static int starty = 100;
	int maxx, l = 1, n = 1;
	double dalta = 20, angle;
	int size;
	void* image;
	initgraph(&gdriver, &gmode, "c:\\tc"); 
	cleardevice(); 
	setbkcolor(BLUE);
	size = imagesize(startx, starty, startx + 60, starty + 60); 
	image = (unsigned char*)malloc(size); 
	maxx = getmaxx();
	while (!kbhit())
	{
		if (l == 1) 
		{
			n++;
			angle = -1 * (n * step) / PI * 180 / R;
			if ((int)(-1 * angle) % 360 < dalta)
				angle -= dalta;
			if (n > (maxx - 70) / step)
				l = 0;
		}
		if (l == 0) 
		{
			--n;
			angle = -1 * (n * step) / R / PI * 180;
			if ((int)(-1 * angle) % 360 < dalta)
				angle -= dalta;
			if (n == 1)l = 1;
		}
		rectangle(startx + n * step, starty, startx + n * step + 60, starty + 40);
		pieslice(startx + n * step + 15, starty + 50, angle, angle - dalta, 10); 
		pieslice(startx + n * step + 45, starty + 50, angle, angle - dalta, 10);
		setcolor(6);
		setfillstyle(SOLID_FILL, YELLOW); 
		circle(startx + n * step + 15, starty + 50, 10); 
		circle(startx + n * step + 45, starty + 50, 10);
		circle(startx + n * step + 15, starty + 50, 3);
		circle(startx + n * step + 45, starty + 50, 3);
		getimage(startx + n * step, starty, startx + n * step + 60, starty + 60, image);
		delay(100);
		putimage(startx + n * step, starty, image, XOR_PUT); //这里的XOR_PUT在vs2019里面无法被识别
	}
	free(image);
	closegraph();
}

0

你这是 Turbo C 的代码,并不能直接放到 EasyX 执行,需要做相应调整。

ava
慢羊羊

2022-9-3

0

看你的意思是想用 SRCINVERT ?

参考文档说明,里面没有这个宏:https://docs.easyx.cn/zh-cn/putimage

ava
xiongfj ◑◑

2022-9-2

技术讨论社区