Drawing into a canvas with alpha channel (RGBA) lazarus / 10-Designer ---------------------------------------------------------------------- Bernd82 · 2009-09-22 12:52 Hello all, I try to draw into a normal TCanvas and want to use a color with an alpha channel. So I want the new graphic element to be partial transparent. The result should work under Windows and Linux. I heard about AggPas, but it seems to be very mighty. Thanks for any help and best regards Bernd82 ---------------------------------------------------------------------- leocda · 2009-09-22 13:50 It has been many years since I used TCanvas for the last time in Delphi or Lazarus, but I know it has serious limitations. In Windows, TCanvas calls the native drawing dll, called "GDI", "GDI32" or so by Microsoft. I can't tell about Vista, but, for any other Microsoft OS, it offers no blending or antialiasing natively. You can just choose the pen/brush color and style. The brush style gives you some control about the background drawing and area filling, but it's not the kind of alpha you want. If your software have to work in Windows, probably you need to use a library or draw by yourself. ---------------------------------------------------------------------- Bernd82 · 2009-09-22 14:00 The objects TFPCanvas and TFPColor seem to be available having R+G+B+A as fields. But I did not manage to get them into action yet. I did not find any description or example  The Windows GDI+ API has alpha blending, but unfortunately it may not work under Linux ---------------------------------------------------------------------- leocda · 2009-09-22 14:08 Quote from: Bernd82 on September 22, 2009, 04:00:08 pmThe objects TFPCanvas and TFPColor seem to be available having R+G+B+A as fields. But I did not manage to get them into action yet. I did not find any description or example  The Windows GDI+ API has alpha blending, but unfortunately it may not work under Linux GDI+ has a poor antialiasing, but the real problem is GDI+ is not native part of several Windows flavors (this kind of dll doesn't work in Linux). Even just for Windows, it's a solution just if you can control what goes installed in your client computers aside of your own program. ---------------------------------------------------------------------- Bernd82 · 2009-09-22 19:58 Is there no graphics library available, that works under Windows and Linux and uses RGBA (alpha blending) ---------------------------------------------------------------------- Bernd82 · 2009-09-23 00:31 So all I want is to e.g. draw a thick line into a normal window and the line doesn't cover the existing window content but transparently lays over it. The degree of transparency can be variable. I append an example image, where three circles are drawn. First the red one then the green one and last the blue one. The degree of opacity can vary from 0 to 255 within the range of one byte. Regards, Bernd82