Tutorials

EasyX is very easy to use.

For example, launch Visual C++, create an empty console project (Win32 Console Application), then add a new code file (.cpp) and reference the easyx.h header file.

Look at an example of drawing a circle:

#include <graphics.h>		// Reference graphics library header file
#include <conio.h>
int main()
{
	initgraph(640, 480);	// Create a graphics window with a size of 640x480 pixels
	circle(200, 200, 100);	// Draw a circle with center (200, 200) and radius 100
	_getch();				// Press any key to continue
	closegraph();			// Close the graphics window
	return 0;
}

Of course, EasyX can also be used on Win32 Application projects. It is important to note that the Win32 Application project does not have a console, so console-related functions cannot be used.

(贡献者:Krissi  编辑