Recent

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

dsiders

  • Hero Member
  • *****
  • Posts: 1084
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...

[EDIT]
Sorry, that riff was in reference to Lazarus trunk.
« Last Edit: March 26, 2021, 04:49:26 pm by dsiders »
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

 

TinyPortal © 2005-2018