Author Topic: TCustomTreeView: Scaled image resolutions in DoPaintNode?  (Read 221 times)


  • Sr. Member
  • ****
  • Posts: 448
TCustomTreeView: Scaled image resolutions in DoPaintNode?
« on: March 26, 2021, 04:35:27 pm »
TCustomTreeView creates a scaled image resolution for Images and StateImages in the DoPaintNode method. This occurs every time DoPaintNode is called, even when the Node can't be drawn because its not visible in the client area.

Wouldn't it be more performant if it occurs only once in DoPaint? Members could be used to store the image resolutions created in DoPaint, and accessed instead of allocated in DoPaintNode.

Or, at a minimum, create the scaled image lists only when the Node is actually visible in DoPaintNode?

Just an idea...

Sorry, that riff was in reference to Lazarus trunk.
« Last Edit: March 26, 2021, 04:49:26 pm by dsiders »
Lazarus 2.0.12 / 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1


TinyPortal © 2005-2018