Skip to content

GraphicsToGraphics2DAdaptor use of Display.getDPI() deprecated #104

@Phillipus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions