大家教我显示像素的程序编写方法啊-啊--啊---

来源:百度知道 编辑:UC知道 时间:2024/07/01 04:06:41
大家教我显示像素的程序编写方法啊-啊--啊---

需要什么语言的?如果是汇编要画点话,必须调用中断,并在ax中填写参数,具体要看哪种汇编了,各不相同
如果是要用c,那就需要先写头函数#include"graphsic.h"
并开启图形模式方可写putpixel(int x, int y, int color); 如果是用basic那就用draw(x,y)还需要其他的,等偶学了再教你

用 MS VC++ 的 CDC class 函数。

画一个像素点的函数:
COLORREF SetPixel( int x, int y, COLORREF crColor );
x,y是坐标,crColor 是画的颜色(RGB红绿蓝的值)。

如果画一张照片,可用CDC class 函数:
BOOL BitBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, DWORD dwRop );

BOOL StretchBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, DWORD dwRop );

详见VC++的帮助文件

在网上打你要的.然后找呀..