neilcsmith-net commented on pull request #2388: URL: https://github.com/apache/netbeans/pull/2388#issuecomment-696658816
Thanks for taking a look at this. Although something feels backwards about the API. Adding new APIs (`LegacyIconLocator`) for old behaviour feels wrong. What I suggested before a number of times, including in discussion around introduction of SVG support, was adding in an API around something like `IconLocator` for the newer options. eg. we currently have a `resource` name which is a path. The existing behaviour handled png and gif files, with branding support. You'd have had an optional SVG loader which handled paths looking for related SVG files, and you could have a logical icon locator that translated non-path (no slash) resource names into icons. The icon locators could stack, so you could have first to resolve wins, or transformed locations from one pass down to the next. The other API which we shouldn't ignore, and is already used in icon loading is ImageIO. I also suggested at the time we look at this for SVG using the [TwelveMonkeys](https://github.com/haraldk/TwelveMonkeys) plugin. Amongst other things, ImageIO has the ability to specify target resolution, which I believe is something missing in our current support - we might use or at least adapt the API from that. eg. [ImageReadParam](https://docs.oracle.com/javase/8/docs/api/javax/imageio/ImageReadParam.html) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
