Hello,

I have a procedure like this:

  procedure PaintIntoMemory(aWidth, aHeight, rowstride: Integer;
    aMemory: Pointer);

It 'paints' some stuff into memory block described by its arguments,
treating memory as RGB bitmap. Then, I want to draw the result on TCanvas.
In Delphi, it is quite simple:

  Bitmap := TBitmap.Create;
  Bitmap.PixelFormat := pf24Bit;
  Bitmap.Width := ...;
  Bitmap.Height := ...;
  PaintIntoMemory(Bitmap.Width, Bitmap.Height,
    BytesPerScanline(Bitmap.Width, 24, 32), Bitmap.Scanline[0]);
  ...
  aCanvas.Draw(0,0,Bitmap);
  
But how to do the same in Lazarus? I guess that I must create a TLazIntfImage,
specify its pixel format, then use its PixelData property...
Or it is better allocate a TRawImage, paint into it and then call
TLazIntfImage.SetRawImage method?
Please point me to a right direction :) Thank you in advance.
  
-- 
Best regards,
 Sergei


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

Reply via email to