Returns a color like the default algorithm of stacked-tree.
capi
stacked-tree-default-color-function stacked-tree item => color
stacked-tree⇩ |
A stacked-tree. |
item⇩ |
Any object. |
color |
A color specification. |
The function stacked-tree-default-color-function
returns a color for item using the same algorithm that stacked-tree uses if you do not specify color-function or colors.
stacked-tree-default-color-function
is useful when you want to associate some items with a fixed color. Your code will be something like:
(defun my-stacked-tree-color-function (pane node) (let ((key (my-get-a-key-from-node node)) (hash-table (my-find-caching-table))) (or (gethash key hash-table) (setf (gethash key hash-table) (stacked-tree-default-color-function pane node)))))
The Profiler tool in the LispWorks IDE uses stacked-tree-default-color-function
to make all occurences of the same function in the tree have the same color even though the items are not eq.
Currently stacked-tree-default-color-function
actually ignores stacked-tree and item and returns a random color.
CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42