How to apply the Windows Shutdown screen effect to a bitmap (Views: 101)
I would like to apply this "screening" effect to a bitmap. I have tried PatBlt, DrawState, and BitBlt, but I don't know what combination of params I need.
Create an 8 x 8 bitmap, where the pixels alternate black and white (as in a checkerboard).
Load that bitmap into the Brush.Bitmap property of whatever Canvas it is that you're trying to modify.
Set the canvas's CopyMode to $00A000C9. (This ANDs the destination with the pattern).
Use CopyRect to draw the canvas onto itself. Example:
Bmp := TBitmap.Create;
with Image1.Picture.Bitmap do
Canvas.Brush.Bitmap := Bmp;
Canvas.CopyMode := $00A000C9;
Canvas.CopyRect(Rect(0, 0, Width, Height), Canvas, Rect(0, 0, 0, 0));
<< Back to main page