And/but extremelly slow on all platforms...

On 3/12/07, Guadagnini David <[EMAIL PROTECTED]> wrote:
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






_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to