[CAPI] apply-scale on pinboard-layout with pinboard-object-at-position
Hi.I need to implement a pinboard-layout with zoom capability and tracking of pinboard-objects that are hovered by mouse.
To scale the pinboard I am using the following code:
(setq tfm (gp:copy-transform gp::*unit-transform*))
(gp:apply-scale tfm 0.5 0.5)
(gp:set-graphics-state pinboard :transform tfm)
(gp:invalidate-rectangle pinboard)
But now the hovering does not work properly as capi still thinks the rectangle has the unscaled dimensions/coordinates.
I found the following discussion online: http://t16314.lisp-lispworks-
It is suggested to write the transformed object bounds to each object. But how do I do that? Somewhere I read that I have to alter the hint-table of the pinboard-object. But altering the hint-table results in redrawing of my object with the new values written to the hint table following the application of the scale transformation which means I have a "double" scale and then the hovering is wrong again.
Am I altering the hint table in a wrong way? (I attached the test code) How does the hint table work? I could not find an explanation of what the hint table really is.
The solution seems to manually transform all the pinboard-objects on the pinboard-layout by altering the hint table and not use apply-scale and set-graphics-state at all? It should be possible to zoom at multiple different levels by pressing a + and - button multiple times.
Thanks in advance