Examples

For more examples, please refer to https://codebus.cn

Character Array

The program demonstrates common drawing operations, including setting fonts, drawing lines, and so on.

cpp source file    exe file

Stars

The program realizes the dynamic effect of two-dimensional starry sky.

cpp source file    exe file

Mouse operations

The program demonstrates the common mouse operation, after the execution of the program will be in the mouse moving track to draw a red dot, press the left button to draw small squares, press Ctrl and left keys to draw large squares, press the right button to exit the program.

cpp source file    exe file

Rainbow

The program is HSL color model application example, the program by adjusting the brightness of HSL model to draw the gradient of the sky, and adjusting the hue to draw seven colors of the rainbow.

cpp source file    exe file