2024年4月10日发(作者:)

c语言头函数(C language head function)

Graphics and image functions

(1) pixel function

56. putpiel () draw pixel function

57. GetPixel () returns the pixel color function

(two) linear and linear functions

58. line () draw line function

59. lineto () draw line function

(five) filled function

76. setfillstyle () sets the fill pattern and the color function

77. setfillpattern () sets the user pattern function

78. floodfill () fills the closed field function

(1) pixel function

56. putpixel () draw pixel function

Function: the function putpixel () draws a pixel on the screen

in graphic mode.

Usage: the function call method is void putpixel (int, x, int,

y, int, color);

Explanation: the parameter x, y is the coordinates of pixels,

and color is the color of the pixel. It can be either a color

name or an integer color value.

The corresponding header file for this function is graphics.h

Return value: None

Cases:

#include

Const int X=200;

Const int Y=300;

Const int N=10;

Void main (void)

{

Int, driver=DETECT, mode, i;

Initgraph (&driver, &mode, "" ");

Setbkcolor (WHITE);

For (i=0; i