org.eclipse.swt.graphics.Device.getDPI()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(230)

本文整理了Java中org.eclipse.swt.graphics.Device.getDPI()方法的一些代码示例,展示了Device.getDPI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Device.getDPI()方法的具体详情如下:
包路径:org.eclipse.swt.graphics.Device
类名称:Device
方法名:getDPI

Device.getDPI介绍

[英]Returns a point whose x coordinate is the horizontal dots per inch of the display, and whose y coordinate is the vertical dots per inch of the display.
[中]返回一个点,其x坐标为每英寸显示器的水平点,y坐标为每英寸显示器的垂直点。

代码示例

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

Point getIndependentDPI() {
  return super.getDPI();
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

public SWTFontResolver(Device device) {
  _device = device;
  _pointsPerPixel = 72f / device.getDPI().y;
  init();
}

代码示例来源:origin: org.jfree/swtgraphics2d

int height = (int) Math.round(fontData.getHeight() * device.getDPI().y
    / 72.0);

代码示例来源:origin: org.jfree/swtgraphics2d

/ device.getDPI().y);
fontData.setHeight(height);

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

Point dpi = this.dpi = getDPI(), screenDPI = getScreenDPI();
NSFont font = NSFont.systemFontOfSize(systemFontSize * dpi.y / screenDPI.y);
font.retain();

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

this.dpi = getDPI();
this.scaleFactor = getDeviceZoom ();
DPIUtil.setDeviceZoom (scaleFactor);
Point dpi = getDPI(), screenDPI = getScreenDPI();
if (dpi.y != screenDPI.y) {
  int size = OS.pango_font_description_get_size(defaultFont);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

this.dpi = getDPI();
this.scaleFactor = getDeviceZoom ();
DPIUtil.setDeviceZoom (scaleFactor);
Point dpi = getDPI(), screenDPI = getScreenDPI();
if (dpi.y != screenDPI.y) {
  int size = OS.pango_font_description_get_size(defaultFont);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

this.dpi = getDPI();
this.scaleFactor = getDeviceZoom ();
DPIUtil.setDeviceZoom (scaleFactor);
Point dpi = getDPI(), screenDPI = getScreenDPI();
if (dpi.y != screenDPI.y) {
  int size = OS.pango_font_description_get_size(defaultFont);

相关文章