Package playn.core

Class Scale.ScaledResource

java.lang.Object
playn.core.Scale.ScaledResource
Enclosing class:
Scale

public static class Scale.ScaledResource extends Object
  • Field Details

    • scale

      public final Scale scale
      The scale factor for this resource.
    • path

      public final String path
      The path to the resource, including any scale factor annotation. If the scale is one, the image path is unadjusted. If the scale is different than one, the scale is tacked onto the image path (before the extension). The scale factor will be converted to an integer per the following examples:
      • Scale factor 2: foo.png becomes foo@2x.png
      • Scale factor 4: foo.png becomes foo@4x.png
      • Scale factor 1.5: foo.png becomes foo@15x.png
      • Scale factor 1.25: foo.png becomes foo@13x.png
      • Scale factor 0.75: foo.png becomes foo@08x.png
  • Constructor Details

    • ScaledResource

      public ScaledResource(Scale scale, String path)
  • Method Details