1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
procedure CreateBitmapFrame(SourceBMP, TargetBMP : TBitMap; FrameX, FrameY : Integer; FrameColor : TColor);
begin
SourceBMP.loadfromfile('C:\fond.bmp') ;
TargetBMP.Height := SourceBMP.Height + 2 * FrameY;
TargetBMP.Width := SourceBMP.Width + 2 * FrameX;
{************************************************************************
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
);
************************************************************************}
BitBlt(TargetBMP.Handle, FrameX, FrameY, SourceBMP.Width, SourceBMP.Height, SourceBMP.Handle, 0, 0, SRCCOPY);
TargetBMP.SaveToFile('C:\fond_2.bmp');
end; |
Partager