Recent

Author Topic: AlphaBlend  (Read 484 times)

Paolo

  • Hero Member
  • *****
  • Posts: 639
AlphaBlend
« on: August 31, 2024, 11:52:37 am »
Hello,

just converted a delphi code, everything is fine except the row cotaining this piece of code


Code: Pascal  [Select][+][-]
  1. ..
  2. AlphaBlend(Target.Canvas.Handle,0,0,W,H,Bitmap2.Canvas.Handle,0,0,W,H,BF);  //--> identifier not found
  3. ..
  4.  

is there AlphaBlend in FPC ? if yese where is it ?

win10-64, fpc 3.2.2/laz 3.2

thank you

wp

  • Hero Member
  • *****
  • Posts: 13210
Re: AlphaBlend
« Reply #1 on: August 31, 2024, 12:07:10 pm »
Alphablending is supported by the FCLImage library coming together with FPC (https://wiki.freepascal.org/fcl-image). Find an Alphablend example in the attachment (it has no GUI and just creates an alpha-blended png image). Note that this library is not compatible with the standard handle-based graphics library. You may want to use TLazIntfImage and TLazCanvas to take advantage of both worlds (https://wiki.freepascal.org/Developing_with_Graphics#Working_with_TLazIntfImage,_TRawImage_and_TLazCanvas).

Paolo

  • Hero Member
  • *****
  • Posts: 639
Re: AlphaBlend
« Reply #2 on: August 31, 2024, 12:37:37 pm »
Ok, thank you.
I see that is not comptibile with Delphi version (different parameters)

 

TinyPortal © 2005-2018