Recent

Author Topic: Object model in aggpaslcl  (Read 2462 times)

VitalArt

  • New Member
  • *
  • Posts: 26
Object model in aggpaslcl
« on: February 04, 2018, 06:10:08 pm »
Hi,
So I wanted to use aggpaslcl to render some text, and I noticed that Agg_2d is implemented using the old object model. Could someone explain to me, why that is and if it should concern me? Is this package outdated? It wasn't installed by default, should I avoid using it?

The code in question is located at lazarus\components\aggpas\src.

I also found another implementation at https://github.com/CWBudde/AggPasMod but examples from there seem to almost always crash/fail to compile on Lazarus.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Object model in aggpaslcl
« Reply #1 on: February 04, 2018, 06:36:27 pm »
Hi,
So I wanted to use aggpaslcl to render some text, and I noticed that Agg_2d is implemented using the old object model. Could someone explain to me, why that is and if it should concern me? Is this package outdated? It wasn't installed by default, should I avoid using it?
It is by design. the old object model is stack based instead of heap based and it has some speed gains which makes it attractive for code that executes multiple times a second like gui, text output etc.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

VitalArt

  • New Member
  • *
  • Posts: 26
Re: Object model in aggpaslcl
« Reply #2 on: February 06, 2018, 03:57:17 am »
Thank you for your response.

I ended up using another, almost identical, unit Agg2D since it actually had some documentation and examples online (http://www.crossgl.com/aggpas/documentation/index.html). It uses both object models at the same time.

 

TinyPortal © 2005-2018