Skip to main content

Display 对象

🌐 Display Object

  • accelerometerSupport string - 可以是 availableunavailableunknown
  • bounds Rectangle - 显示器在DIP点中的边界。
  • colorDepth number - 每像素的比特数。
  • colorSpace string - 表示一种色彩空间(三维对象,包含所有可实现的颜色组合),用于颜色转换。
  • depthPerComponent number - 每个颜色分量的位数。
  • detected boolean - 如果系统检测到显示器,则为 true
  • displayFrequency number - 显示器刷新率。
  • id number - 与显示器相关的唯一标识符。值为 -1 表示显示器无效或正确的 id 尚未知,值为 -10 表示显示器是分配给统一桌面的虚拟显示器。
  • internal boolean - true 用于内部显示,false 用于外部显示。
  • label string - 用户友好的标签,由平台决定。
  • maximumCursorSize Size - 原生像素下的最大光标尺寸。
  • nativeOrigin Point - 以像素坐标返回显示器的原点。仅在像 X11 这样的窗口系统上可用,这些系统以像素坐标定位显示器。
  • rotation number - 可以是 0、90、180、270,表示屏幕顺时针旋转的角度。
  • scaleFactor number - 输出设备的像素缩放因子。
  • touchSupport string - 可以是 availableunavailableunknown
  • monochrome boolean - 显示屏是否为单色显示屏。
  • size 尺寸
  • workArea Rectangle - 显示器工作区域的 DIP 点数。
  • workAreaSize Size - 工作区域的大小。

Display 对象表示连接到系统的物理显示器。在无头系统上可能存在一个假的 Display,或者 Display 可能对应于远程的虚拟显示器。

🌐 The Display object represents a physical display connected to the system. A fake Display may exist on a headless system, or a Display may correspond to a remote, virtual display.