Class HiDPIProportionalFontSizePolicy

java.lang.Object
org.jzy3d.plot3d.primitives.axis.layout.fonts.HiDPIProportionalFontSizePolicy
All Implemented Interfaces:
IFontSizePolicy

public class HiDPIProportionalFontSizePolicy extends Object implements IFontSizePolicy
This is the greatest IFontSizePolicy since it scale base font with current pixel scale. This is mainly useful to keep the same text size visually when a chart is moved from a HiDPI screen to a non HiDPI screen. The base font is based on
invalid @link
IAxisLayout#getFont()
.
Author:
Martin Pernollet
  • Field Details

    • view

      protected View view
    • baseFont

      protected Font baseFont
    • apply_WindowsHiDPI_Workaround

      protected boolean apply_WindowsHiDPI_Workaround
  • Constructor Details

    • HiDPIProportionalFontSizePolicy

      public HiDPIProportionalFontSizePolicy(View view)
  • Method Details

    • getBaseFont

      public Font getBaseFont()
    • setBaseFont

      public void setBaseFont(Font baseFont)
    • apply

      public Font apply(AxisLayout layout)
      Modifies the
      invalid @link
      IAxisLayout
      font according to the pixel scale returned by the View and the font that was returned by
      invalid @link
      IAxisLayout
      at the first call to this method.
      Specified by:
      apply in interface IFontSizePolicy