HiDPI graphics on Windows and Linux

A concerted effort was made to ensure the crispness of on-screen components relative to the pixel density of the display. The following terms are relevant to this effort and are provided along with the accompanying listed descriptive information:

  • DPI-aware application: An application that is able to detect and scale images for the display's specific pixel density.
  • DPI-unaware application: An application that makes no attempt to detect and scale images for the display's specific pixel density.
  • HiDPI graphics: High dots-per-inch graphics.
  • Retina display: This term was created by Apple to refer to displays with a pixel density of at least 300 pixels per inch. Displaying graphics, both images, and graphical user interface components, to the user is typically of paramount performance. Displaying this imagery in high quality can be somewhat problematic. There is large variability in computer monitor DPIs. There are three basic approaches to developing for displays:
  • Develop apps without regard for the potential different display dimensions. In other words, create a DPI-unaware application.
  • Develop a DPI-aware application that selectively uses pre-rendered image sizes for a given display.
  • Develop a DPI-aware application that properly scales images up/down to account for the specific display on which the application is run.

Clearly, the first two approaches are problematic and for different reasons. With the first approach, the user experience is not considered. Of course, if the application was being developed for a very specific display with no expected pixel density variability, then this approach could be viable.

The second approach requires a lot of work on the design and development end to ensure images for each expected display density are created and implemented programmatically. In addition to the tremendous amount of work, the app size will unnecessarily increase, and new and different pixel densities will not have been accounted for.

The third approach is to create a DPI-aware application with efficient and effective scaling capabilities. This approach works well and has been proven with the Mac retina displays. 

Prior to Java 9, automatic scaling and sizing was already implemented in Java for the macOS X. This capability was added in Java 9 for Windows and Linux operating systems.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset