Class DimensionTools


  • public class DimensionTools
    extends java.lang.Object
    • Field Detail

      • BG_COLOR

        public static final java.awt.Color BG_COLOR
    • Constructor Detail

      • DimensionTools

        public DimensionTools()
    • Method Detail

      • dimensionsToFit

        public static Dimension dimensionsToFit​(Dimension target,
                                                Dimension source)
        Returns width and height that allow the given source width, height to fit inside the target width, height without losing aspect ratio