Class HiDPIUtils

java.lang.Object
org.pushingpixels.radiance.common.internal.contrib.flatlaf.HiDPIUtils

public class HiDPIUtils extends Object
  • Constructor Details

    • HiDPIUtils

      public HiDPIUtils()
  • Method Details

    • paintAtScale1x

      public static void paintAtScale1x(Graphics2D g, JComponent c, RadianceCommonCortex.PainterScale1X painterScale1X)
    • paintAtScale1x

      public static void paintAtScale1x(Graphics2D g, int x, int y, int width, int height, RadianceCommonCortex.PainterScale1X painterScale1X)
      Paint at system scale factor 1x to avoid rounding issues at 125%, 150% and 175% scaling.

      Scales the given Graphics2D down to 100% and invokes the given painter passing scaled x, y, width and height.

      Uses the same scaling calculation as the JRE uses.