如果直接用API实现在Form的Canvas上绘出一个*.bmp位图文件?(200分)

  • 主题发起人 主题发起人 silicon
  • 开始时间 开始时间
S

silicon

Unregistered / Unconfirmed
GUEST, unregistred user!
关于图像处理的问题,如果直接用API实现在Form的Canvas上绘出一个*.bmp位图文件?
 
The BitBlt function performs a bit-block transfer of the color
data corresponding to a rectangle of pixels from the specified
source device context into a destination device context.

BOOL BitBlt(
HDC hdcDest, // handle to destination DC
int nXDest, // x-coord of destination upper-left corner
int nYDest, // y-coord of destination upper-left corner
int nWidth, // width of destination rectangle
int nHeight, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXSrc, // x-coordinate of source upper-left corner
int nYSrc, // y-coordinate of source upper-left corner
DWORD dwRop // raster operation code
);
 
为什么用API?
直接在CANVAS上画不就得勒?
 
BitBlt with StretchBlt

BitBlt(Form1.Canvas.Handle,0,0,100,100,Bmp1.Canvas.Handle,0,0,SRCCOPY);
 
如果FORM完全不是规则的,还可以直接在CANVAS上画吗?
 
TO: 诸葛白痴
Bmp1.Canvas 的图像是怎么得来的?还不是用Bmp1.LoadFromFile来得到,这用了API吗?

推荐看以下文章:
http://www.copathway.com/vchelp/zart/bmpc.asp?type_id=18&class_id=1&cata_id=12&article_id=82
http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/Win32API.htm#APICalls
http://delphiapi.narod.ru/part06.htm
http://delphi.mastak.ru/articles/dib/index.html#2
 
其实这个问题就不应该问
 
其实这个问题就不应该问
 
又浪费了200分了吧.^^
 
后退
顶部