DrawDibRealize
这个函数为用指定DC实现DrawDib DC 的调色板。
UINT DrawDibRealize (
HDRAWDIB hdd ,
HDC hdc ,
BOOL fBackground
) ;
参数
hdd DrawDib DChdd DrawDib DC的句柄。
hdc 包含调色板的DC的句柄。
fBackground 背景调色板标志。如果此值非零,此调色板为背景调色板。如果此值为零并且DC与另一个窗口相连,当窗口拥有输入焦点时逻辑调色板变为背景调色板。(当窗口风格是CS_OWNDC或当DC是用GetDC函数得到的时,一个DC就与一个窗口相连)。
使用过ScanLine没有,我用它可以达到30帧/秒的时时动态生成的画面。
procedure TForm1.Button1Click(Sender: TObject);
var
x,y : Integer;
BitMap : TBitMap;
P : PByteArray;
begin
BitMap := TBitMap.create;
try
BitMap.LoadFromFile('C:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');
for y := 0 to BitMap.Height -1 do
begin
P := BitMap.ScanLine[y];
for x := 0 to BitMap.Width -1 do
P[x] := y;
end;
Canvas.Draw(0,0,BitMap);
finally
BitMap.Free;
end;
end;
试试先!
gz
up
up
没有人要分了,呵呵
unit DrawDib;
intece
uses
Windows;
// DrawDib flags
const
DDF_UPDATE =$0002;// re-draw the last DIB
DDF_SAME_HDC =$0004;// HDC same as last call (all setup)
DDF_SAME_DRAW =$0008;// draw params are the same
DDF_DONTDRAW =$0010;// dont draw frame, just decompress
DDF_ANIMATE =$0020;// allow palette animation
DDF_BUFFER =$0040;// always buffer image
DDF_JUSTDRAWIT = $0080;// just draw it with GDI
DDF_FULLSCREEN = $0100;// use DisplayDib
DDF_BACKGROUNDPAL = $0200;// Realize palette in background
DDF_NOTKEYFRAME = $0400;// this is a partial frame update, hint
DDF_HURRYUP =$0800;// hurry up please!
DDF_HALFTONE =$1000;// always halftone
DDF_PREROLL =DDF_DONTDRAW; // Builing up a non-keyframe
DDF_SAME_DIB =DDF_SAME_DRAW;
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-27468-15.html
还是在我国领土内
应民
果断把今天刚买的芝麻糊扔掉