@Deprecated
    public static float getScreenPixelRatio() {
        //TODO replace with API from Java 9 once that is released
        if (Platform.isMac()) {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Object contentScaleFactor = toolkit.getDesktopProperty("apple.awt.contentScaleFactor");
            if (contentScaleFactor instanceof Number) {
                return ((Number) contentScaleFactor).floatValue();
            } else {
                return 1.0f;
            }
        } else {
            return 1.0f;
        }
    }
@Deprecated
    public static float getScreenPixelRatio() {
       
        if (Platform.isMac()) {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Object contentScaleFactor = toolkit.getDesktopProperty("apple.awt.contentScaleFactor");
            if (contentScaleFactor instanceof Number) {
                return ((Number) contentScaleFactor).floatValue();
            } else {
                return 1.0f;
            }
        } else {
            return 1.0f;
        }
    }
@deprecated public static float getscreenpixelratio() { if (platform.ismac()) { toolkit toolkit = toolkit.getdefaulttoolkit(); object contentscalefactor = toolkit.getdesktopproperty("apple.awt.contentscalefactor"); if (contentscalefactor instanceof number) { return ((number) contentscalefactor).floatvalue(); } else { return 1.0f; } } else { return 1.0f; } }