בSaturday 13 May 2006 17:32, נכתב על ידי Andreas Berger:
> Christian Iversen wrote:
> >On Saturday 13 May 2006 13:05, Andreas Berger wrote:
> >>Micha Nelissen wrote:
> >>>On Fri, 12 May 2006 13:50:22 -0300
> >>>
> >>>Andreas Berger <[EMAIL PROTECTED]> wrote:
> >>>>Reading and writing pixels to a bitmap under windows 98 does not work.
> >>>> I have looked at the Lazarus LCL code and it seem correct since it
> >>>> ends up
> >>>
> >>>Please send an example project that reproduces the error.
> >>
> >>Here is a simple example that horizontally flips a small image:
> >>
> >>procedure TForm1.Button1Click(Sender: TObject);
> >>var
> >>    x, y, x1 : integer;
> >>    bmp : TBitmap;
> >>begin
> >>    bmp := TBitmap.Create;
> >>    bmp.Assign(Image1.Picture.Bitmap);
> >>    for y := 0 to bmp.Height - 1 do
> >>    begin
> >>        x := 0;
> >>        x1 := bmp.Width - 1;
> >>        while (x < bmp.Width) do
> >>        begin
> >>            bmp.Canvas.Pixels[x, y] :=
> >>Image1.Picture.Bitmap.Canvas.Pixels[x1, y];
> >>            inc(x);
> >>            dec(x1);
> >>        end;
> >>    end;
> >>    Image2.Picture.Bitmap.Assign(bmp);
> >>    bmp.Free;
> >>end;
> >>
> >>Form.bmp has the result in Lazarus, Form1.bmp has the result in delphi.
> >>The project is attached.
> >
> >Seems to me the mask is not flipped?
>
> What mask?

In order to know what part of the image to display and what part of the image 
to hide (transparent effect), there are many ways to do it.. the most common 
and easy way to do it, is by using mask.

A mask is a monochmore copy of the image, where black is for the transparent 
copy, and the white is for the part that you wish to display. 

Ido
-- 
At any given moment, an arrow must be either where it is or where it is
not.  But obviously it cannot be where it is not.  And if it is where
it is, that is equivalent to saying that it is at rest.
                -- Zeno's paradox of the moving (still?) arrow

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

Reply via email to