1) Memorize the part of the canvas that has to contain the bit-map
2) Memorize the used color as transparency
3) Execute:

Procedure CopyCanvas(Dest, Source : TCanvas; x0, y0 : Integer; TransColor : TColor);
Var
 X, Y : Integer;
Begin
  For X := 0 To Source.Height-1 Do
         For Y := 0 To Source.Width-1 Do
                If Source.Pixels[X, Y] <> ColorT
                Then
                   Dest.Pixels[X+X0, Y+Y0] := Source.Pixels[X, Y];
End;

where

Dest : Destination Canvas
Source: Source canvas (bitmap)
x0,y0: upper left corner into destination canvas
TransColor: transparent color

This procedure is valid both in Windows, in Linux or Mac or other systems



begin:vcard
fn:David Guadagnini
n:Guadagnini;David
email;internet:[EMAIL PROTECTED]
x-mozilla-html:FALSE
version:2.1
end:vcard

Reply via email to