This PR changes NodeDeclaration to store a function pointer in addition to a wxImage. If the Node declaration uses a SVG file for it's image, the function pointer will be set instead of the wxImage. The navigation panel code first looks for a function pointer, and uses that to retrieve the correct DPI size instead of calling wxImage::Scale().
For now, both methods will be supported. However once all PNG files have been converted to SVG, the wxImage member and functions supporting it will be removed.
As a proof of concept, flex_grid_sizer.svg is now used both for the ribbon panel and for the image list in the navigation panel.
History for this PR will look a bit weird -- I initially added lunasvg as a subtree, then realized I wouldn't need it once it was part of wxWidgets since I could access it from there. I reverted the change, but that still shows up in history.
This PR changes NodeDeclaration to store a function pointer in addition to a wxImage. If the Node declaration uses a SVG file for it's image, the function pointer will be set instead of the wxImage. The navigation panel code first looks for a function pointer, and uses that to retrieve the correct DPI size instead of calling wxImage::Scale().
For now, both methods will be supported. However once all PNG files have been converted to SVG, the wxImage member and functions supporting it will be removed.
As a proof of concept, flex_grid_sizer.svg is now used both for the ribbon panel and for the image list in the navigation panel.
History for this PR will look a bit weird -- I initially added lunasvg as a subtree, then realized I wouldn't need it once it was part of wxWidgets since I could access it from there. I reverted the change, but that still shows up in history.