Skip to content

GraphicsToGraphics2DAdaptor use of Display.getDPI() deprecated #104

Description

@Phillipus

Display.getDPI() is deprecated. See eclipse-platform/eclipse.platform.swt#2925

The GraphicsToGraphics2DAdaptor used by GMF calls Display.getDPI() to calculate the correct font height:

int dpi = Integer.getInteger("org.eclipse.gmf.runtime.draw2d.ui.render.dpi", DisplayUtils.getDisplay().getDPI().x); //$NON-NLS-1$
float fsize = (float) height * (float) dpi / 72.0f; // display DPI / AWT DPI
height = (int) fsize;

I'm interested to know what could be done to solve this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions