Recent

Author Topic: LCL 1.9 Questions  (Read 1787 times)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
LCL 1.9 Questions
« on: February 08, 2018, 02:34:20 pm »
Hi, I have a component BGRAImageList that fixes basically the alpha channels of the regular ImageList on Linux.

I did not code that component, but I'm the one that updates the package.

Sources:
https://github.com/bgrabitmap/bgracontrols/blob/master/bgraimagelist.pas

It works fine in 1.8, but in trunk there are changes like:

1.8
TCustomImageList = class(TLCLReferenceComponent)

1.9 is TCustomImageList = class(TLCLComponent), so the method ReferenceNeeded is not available.

Questions:
- What does ReferenceNeeded, and if it is necessary on 1.9.

Another is this:

1.8
Code: Pascal  [Select][+][-]
  1. procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType;
  2.       ADrawEffect: TGraphicsDrawEffect); overload; virtual;

1.9
Code: Pascal  [Select][+][-]
  1. procedure Draw(ACanvas: TCanvas; AX, AY, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType;
  2.       ADrawEffect: TGraphicsDrawEffect); overload;

In 1.9 the virtual was removed and I can't use override anymore.

My question is if the method still will be called instead of the LCL one in 1.9 without using override. I know this is a basic of OOP but I need a bit of help because I never use virtual and overload.

Another question: If I remove override to compile in 1.9, what happens in 1.8?

I never use IFDEF LCL_FULLVERSION and don't know how to use it, any chances to have 2 different methods, one with override and other without, one for 1.8 and one for 1.9 or newer?

balazsszekely

  • Guest
Re: LCL 1.9 Questions
« Reply #1 on: February 08, 2018, 02:58:01 pm »
Hi lainz,

There is a new feature in Lazarus trunk, namely HighDPI imagelist, for more info please read here : http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-High-DPI-TImageList-td4053834.html 
I did not study all the details, so I cannot answer to specific questions, but Ondrej(the author) regularly visits the forum,  or you can ask question in the mailing list.
« Last Edit: February 08, 2018, 04:27:25 pm by GetMem »

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: LCL 1.9 Questions
« Reply #2 on: February 08, 2018, 04:04:21 pm »
Hi lainz,

There is a new feature in Lazarus trunk, namely HighDPI imagelist, for more info please read here : http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-High-DPI-TImageList-td4053834.html 
I did not study all the details, so I cannot answer to specific question, but Ondrej(the author) regularly visits the forum,  or you can ask question in the mailing list.

Thanks. I suscribed and sent a message there.

 

TinyPortal © 2005-2018