Recent

Author Topic: AggPas in Linux  (Read 822 times)

wp

  • Hero Member
  • *****
  • Posts: 11855
AggPas in Linux
« on: May 15, 2022, 01:06:51 pm »
Does anybody have experience with AggPas, in particular with the version which comes with Lazarus? When running the example AggPas_LCLDemo1_example in (lazarus)/components/aggpas/lazarus/examples under Linux the red and blue color channels are interchanged.

By default, the AppPas canvas is set up in the color model rgba32 (AggLCLCanvas.Image.PixelFormat:=afpimRGBA32); there is no pixel format such as "afpimBGRA32", but I am sure that something like this is supported internally since there are numerous color definiton functions (such as pixfmt_rgba32 and pixfmt_bgra32).

It there a way to set up AppPas so that colors in Linux are correct (without explicitly interchanging red and blue again)?

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: AggPas in Linux
« Reply #1 on: May 15, 2022, 07:27:27 pm »
Hi!

I don't know nothing about AggPas but from my experience with BGRA I can tell you this:

* Linux and Windows have different color systems - RGBA vs BGRA

* RGBAbitmap detects while initialising which color system is the valid one

* If you want to change the color system to get the same one on both OS you can do that by calling a procedure

Those mechanism must be available for AggPas.

Winni

 

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: AggPas in Linux
« Reply #2 on: May 16, 2022, 01:15:17 am »
Long time ago I have played with AggPas from CodeTyphon, and if I remember well there was nothing wrong when using it on Linux. After some time it started conflicting with Lazarus version, so I sadly kicked it out from OPM although CT version felt more complete and had much more examples. However, if you want to play you can still find it in ct4laz repo:
https://bitbucket.org/avra/ct4laz/downloads/px_aggpas.zip
https://bitbucket.org/avra/ct4laz/downloads/px_aggpasvs.zip

Looking at my notes in pl_packages_list.xls, I see that origin seams to come from https://github.com/CWBudde/AggPasMod, and that quick hack to solve the conflict could be to rename your \lazarus\components\aggpas dir to aggpas.tmp.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018