W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
原型:extern int getpixel(int x, int y);
用法:#include <system.h>
功能:返回屏幕上指定點的狀態(tài)
說明:(x,y)為屏幕上點的坐標,如果點為清除狀態(tài)返回零,否則返回非零值。
舉例:
// pixel.c
#include <system.h>
main()
{
int i,j;
clrscr();
printf("V");
gotoxy(10,10); // Hide cursor
for(i=0;i<8;i++)
for(j=0;j<16;j++)
{
if(getpixel(i,j))
putpixel(10+i,10+j,1);
else
putpixel(10+i,10+j,0);
}
getchar();
return 0;
}
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: