Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2604

Support SVG icon loading from ImageUtilities

    XMLWordPrintableJSON

Details

    Description

      Support SVG image loading from ImageUtilities, primarily for icons. This would be implemented as a special subclass of javax.swing.Icon, rather than through MultiResolutionImage. Eirik Bakke already has most of this code ready.

      Motivation: To look good on HiDPI/Retina displays, the NetBeans IDE, and NetBeans Platform (RCP) applications, will eventually need to provide high-resolution versions of various image asset (typically icons). Two approaches are possible: (1) allow each icon to be supplied as multiple bitmap (i.e. PNG) files, one for each resolution, or (2) allow each icon to be supplied as a single SVG file. This issue deals with the latter approach. (The multiple resolution approach is discussed in NETBEANS-1583 .)

      On Windows, arbitrary HiDPI scaling factors may be specified, such as 150%, 175%, 200%, or 250%. Additionally, MultiResolutionImage does not work properly on Windows due to https://bugs.openjdk.java.net/browse/JDK-8212226 . Thus, I now consider the SVG approach to be the most feasible one.

      Attachments

        Issue Links

          Activity

            People

              ebakke Eirik Bakke
              ebakke Eirik Bakke
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 16.5h
                  16.5h