Skip to content

YY. PixelEnvelope ​

屏幕范围对象,用来表示屏幕像素的范围, 有最小屏幕坐标和最大屏幕坐标组成

creation ​

  • constructor(xmin, ymin, xmax, ymax)
js
var pixelEnvelope = new YY.PixelEnvelope(0, 0, 100, 100);

properties ​

  • {float} pixelEnvelope.xmin
  • {float} pixelEnvelope.ymin
  • {float} pixelEnvelope.xmax
  • {float} pixelEnvelope.ymax

method ​

clone() ​

getCenter() ​

contains(pixel) ​

  • 是否包含所给的像素值
  • 参数
  • 返回值: Boolean

getBottomLeft() ​

  • 获取底部左边的像素坐标
  • 返回值:YY. Pixel

getTopLeft() ​

  • 获取顶部左边的像素坐标
  • 返回值:YY. Pixel

getBottomRight() ​

  • 获取底部右边的像素坐标
  • 返回值:YY. Pixel

getTopRight() ​

  • 获取顶部右边的像素坐标
  • 返回值:YY. Pixel

getMin() ​

  • 获取最小值,等同于顶部左边像素坐标
  • 返回值:YY. Pixel

getMax() ​

  • 获取最大值,等同于底部右边像素坐标
  • 返回值:YY. Pixel

getSize() ​

  • 获取当前像素范围对应的大小
  • 返回值:YY. Pixel

toString() ​

  • 字符串序列化
  • 返回值: String

This document is generated by vitepress and Edit by deyihu